You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For some subjects, the function returned complex valued numbers. This seems to be because the updated function uses the mean variance of all betas--including motion regressors--to scale the degrees of freedom, as in the statement "SPM.xX.trRV/(Nrun*mean(diag(SPM.xX.Bcov)))" on line 85. In my data, motion regressor estimates of some subjects had extremely high variance, which led to degrees of freedom scaled close to zero and to no shrinkage being applied by the covdiag() function.
I wonder if scaling with the variance of all betas (including motion regressors) was intended as the parameter vectors of confound regressors are usually not of interest for multivariate noise normalisation? In my data, I could bypass this issue by excluding motion regressors from Bcov.
Many thanks and best wishes
Andres
The text was updated successfully, but these errors were encountered:
I'd like to second Andres's concern about the new version of noiseNormalizeBeta. The new (October, 2018) version of this function returns complex values for the betas. However, this problem wasn't resolved for me by removing the motion regressors from the Bcov matrix like Andres suggested.
I reverted the code to the prior version from 2015 and found that it gave much more sensible output for the betas, but was still returning complex numbers in some cases.
When I took a look at the eigenvalues for the covariance matrix that came from the 'covdiag' function, I noticed that they were very small and negative, so I suspected that something was probably wrong with the shrinkage method.I stuck the covariance shrinkage function from the Decoding Toolbox (Hebart and Gorgen) in place of covdiag. This seems to have fixed the problem as eigenvalues of the covariance matrix are all positive, non-zero. The results are highly correlated with those using RSA Toolbox with the 2015 version of noiseNormalizeBeta, but without the odd complex value output.
I hope someone in the development team can take a look at this and see what the problem is. Otherwise, this seems like a reasonable hack for the moment.
Dear Developers
I tried to use the new version of noiseNormalizeBeta.m (https://github.com/rsagroup/rsatoolbox/blob/develop/%2Brsa/%2Bspm/noiseNormalizeBeta.m) on single-trial neural activation pattern estimates.
For some subjects, the function returned complex valued numbers. This seems to be because the updated function uses the mean variance of all betas--including motion regressors--to scale the degrees of freedom, as in the statement "SPM.xX.trRV/(Nrun*mean(diag(SPM.xX.Bcov)))" on line 85. In my data, motion regressor estimates of some subjects had extremely high variance, which led to degrees of freedom scaled close to zero and to no shrinkage being applied by the covdiag() function.
I wonder if scaling with the variance of all betas (including motion regressors) was intended as the parameter vectors of confound regressors are usually not of interest for multivariate noise normalisation? In my data, I could bypass this issue by excluding motion regressors from Bcov.
Many thanks and best wishes
Andres
The text was updated successfully, but these errors were encountered: