Bug Description
In Analysis.m line 1051, the Granger causality mask computation:
ensCovMaskTemp(neighbors(j), neuronNum) = 0;
This zeroes ALL columns indexed by neuronNum (the full neuron list) instead of just the specific neuron being tested neuronNum(i). This causes the Granger causality test to incorrectly exclude covariates for neurons that should still be included.
Expected Fix
ensCovMaskTemp(neighbors(j), neuronNum(i)) = 0;
Related
Additionally, lines 1063-1066 have a related issue where the phiMat computation via strfind/~isempty always indexes only the first coefficient rather than iterating properly.
Found during comprehensive cross-toolbox audit (Python nSTAT-python already handles this correctly).
Bug Description
In
Analysis.mline 1051, the Granger causality mask computation:This zeroes ALL columns indexed by
neuronNum(the full neuron list) instead of just the specific neuron being testedneuronNum(i). This causes the Granger causality test to incorrectly exclude covariates for neurons that should still be included.Expected Fix
Related
Additionally, lines 1063-1066 have a related issue where the
phiMatcomputation viastrfind/~isemptyalways indexes only the first coefficient rather than iterating properly.Found during comprehensive cross-toolbox audit (Python nSTAT-python already handles this correctly).