Hi
When estimating a repeated measures 2nd level model I am running into
warnings during the temporal non-sphericity estimation. This is only for
some models, but it doesn't seem to correspond to a particular type of
design. The warning is:
Temporal non-sphericity (over voxels) : ...REML estimation
Warning: Matrix is close to singular or badly scaled.
Results may be inaccurate. RCOND = 7.562340e-17.
> In spm_dx at 43
In spm_reml at 141
In spm_spm at 907
In spm_config_fmri_est>run_est at 394
In spm_jobman>run_struct1 at 1587
In spm_jobman>run_struct1 at 1597
In spm_jobman>run_struct1 at 1597
In spm_jobman>run_struct at 1516
ReML Iteration : 1 ...2.267529e+02
The estimation then goes on for 11-12 steps and never really gets close to
converging.
A previous post
http://www.jiscmail.ac.uk/cgi-bin/webadmin?A2=ind0709&L=SPM&P=R30977&I=-3&m=
27885
suggesting changing some of the code in spm_spm to avoid NaN's. I tried
this, but it didn't help (I'm not really sure why it would have worked
except for avoiding a square root) and in checking Cy there weren't any
NaN's in the first place.
Looking through the code I tried changing the 32 in line 78 of spm_reml to a
16.
hP = speye(m,m)/exp(32); ---> hP = speye(m,m)/exp(16);
This is similar to the advice given regarding similar warnings from spm_PEB.
In that case the last line was to be changed from C = inv(C +
speye(length(C))*exp(-32)); to
C = inv(C + speye(length(C))*exp(-16));
When I did this the warning messages went away and the ReML calculation
nicely convered in 5 steps.
The explanation was that the calculation assumes some small uniform prior on
a covariance estimate, and this sometimes ends up close to singular for
certain matrices.
I'm wondering if there is some less fiddly way of getting this to work. It
seems that the factor of 32 is just to make some large number, but is there
some way to adjust it properly for a dataset.
thanks,
darren
|