Dear FreeSurfer group,
I am running the univariate analysis to test if there is a change in thickness between two groups over time. The dataset has a baseline and a follow-up scan (i.e., two time points) and consist of about 40 patients and 40 controls.
I receive an an error which states "Algorithm does not converge after 50 iterations!!!" when I am running the following commands: test_stats = lme_fit_FS(X,[1 2],Y(:,1)+Y(:,2),ni); test_stats = lme_fit_FS(X,[2],Y(:,1)+Y(:,2),ni);
Why am I getting this error?
The qdec table looks as shown below and is loaded into Matlab by the following command: Qdec = fReadQdec('.../path/qdec/qdec.table.dat'); The fsid and actual numbers are changed for this forum post (but the original is similar). The thickness scores has been extracted using the QDEC (GUI).
fsid fsid-base time group age gender hand_score lh_MeanThickness_thickness rh_MeanThickness_thickness 17a 17_base 0.000000000 1.000000000 29.000000000 1.000000000 90.000000000 2.686580000 2.490300000 17c 17_base 7.428512429 1.000000000 29.000000000 1.000000000 90.000000000 2.728190000 2.507870000 13a 13_base 0.000000000 1.000000000 34.000000000 0.000000000 60.000000000 2.418060000 2.214930000 13c 13_base 6.857134857 1.000000000 34.000000000 0.000000000 60.000000000 2.321630000 2.109870000 12a 12_base 0.000000000 0.000000000 21.000000000 0.000000000 100.000000000 2.569720000 2.439500000 12c 12_base 6.857134857 0.000000000 21.000000000 0.000000000 100.000000000 2.651950000 2.444010000 53a 53_base 0.000000000 0.000000000 19.000000000 1.000000000 70.000000000 2.620390000 2.375250000 53c 53_base 13.55314571 0.000000000 19.000000000 1.000000000 70.000000000 2.606590000 2.381630000 ...
I run the following commands: Qdec = rmQdecCol(Qdec,1); sID = Qdec(2:end,1); Qdec = rmQdecCol(Qdec,1); M = Qdec2num(Qdec); Y = M(:,6:7); M = M(:,1:5); [M,Y,ni] = sortData(M,1,Y,sID); X = [ones(length(M),1) M M(:,1).*M(:,2)];
When I then run the step below I get the following errors:
A) test_stats = lme_fit_FS(X,[1 2],Y(:,1)+Y(:,2),ni); # Algorithm does not converge after 50 iterations!!! B) test_stats = lme_fit_FS(X,[1],Y(:,1)+Y(:,2),ni); # This works! C) test_stats = lme_fit_FS(X,[2],Y(:,1)+Y(:,2),ni); # Algorithm does not converge after 50 iterations!!!
However, when I change the QDEC table, so time starts at 1 instead of 0, the error disappears for one of them but not the one with two random effects.
A) test_stats = lme_fit_FS(X,[1 2],Y(:,1)+Y(:,2),ni); # Algorithm does not converge after 50 iterations!!! B) test_stats = lme_fit_FS(X,[1],Y(:,1)+Y(:,2),ni); # This works! C) test_stats = lme_fit_FS(X,[2],Y(:,1)+Y(:,2),ni); # This works!
Why am I getting this error and how should I fix it?
Best wishes Kasper
________________________________
Denne e-mail indeholder fortrolig information. Hvis du ikke er den rette modtager af denne e-mail eller hvis du modtager den ved en fejltagelse, beder vi dig venligst informere afsender om fejlen ved at bruge svarfunktionen. Samtidig bedes du slette e-mailen med det samme uden at videresende eller kopiere den.
freesurfer@nmr.mgh.harvard.edu