Hi Jorge,

Thank you for your careful explanations, it did help :)
Regards, -Ting 


On Wed, Dec 12, 2012 at 11:35 PM, jorge luis <jbernal0019@yahoo.es> wrote:
Hi Ting

Just use the default procedure. We limited the number of iterations for the estimation procedure to 20 for the mass-univariate analysis. If the model for the covariance is correct, that is to say, you have correctly specified the set of random effects that is supported by your data then the estimation at each vertex usually converges in a few iterations (between 5 and 9).

In your case, you have only two repeated measures in your data. In that scenario, you should only use a single random effect for the intercept term (or maybe for the head_motion time-varying covariate, see who produces better convergence results). You cannot use a model with two random effects when you only have two repeated measures because you don't have enough degrees of freedoms in your data.
For example, if you had to estimate a completely unstructured covariance then you would only need to estimate three covariance parameters for two repeated measures, on the other hand if you impose structure on the covariance using the mixed effects model with two random effects then you are estimating four covariance components which will impose too much structure on the covariance and the estimation algorithm will fail to converge most of the time.

Finally, even when the set of random effects is correctly specified the iterative estimation procedure may not converge at several vertices (eg. 10% or may be more of the total number of vertices under analysis).

Hope this helps.

Best
-Jorge




De: ting xu <xutingxt@gmail.com>
Para: freesurfer@nmr.mgh.harvard.edu
Enviado: Miércoles 12 de diciembre de 2012 9:22
Asunto: [Freesurfer] issue about LME Matlab tools


Dear all, 

A few questions come to me when I used LME Matlab toolbox. Then Jorge kindly answered my questions and he also asked me to post our discussion to Freesurfer list so everyone knows what's going on here :) 

Cheers, Ting
-------------------------------------------------------------------
Subject: Re: Re: issue about LME Matlab tools 
Sent: Tue, Dec 11, 2012 21:41:26 
Hi Ting
Please could you post this question to the Freesurfer list, so other people can benefit from this discussion?
I'll answer you ASAP.
Best
-Jorge
------------------------------------------------------
Subject: Re: Re: issue about LME Matlab tools 
Sent: Wed, Dec 12, 2012 6:44:36 AM 

Hi Jorge, 

Thank you for your explanation in more details. I followed your suggestion, set the convergence epsilon to 10^-5. It truly improved. I am now running the whole brain data, estimations in several voxels were not converge after 50 iterations. Given that iterations takes more computational time, how many iterations do you recommend and what do you usually do if it still not converge?
Thank you again:)

Warmly regards,

Ting
------------------------------------------------------
Subject: Re: issue about LME Matlab tools
Sent: Wed, Dec 12, 2012 00:50:35

Hi Ting

You needed more iterations to make the algorithm stop closer to the optimal values. Try:

statsFS= lme_fit_FS(X,[1 2],Y,ni,10^-5);

or the EM algorithm

statsEM = lme_fit_EM(X,[1 2],Y,ni,10^-10);

Neither of these algorithms can be guaranty to converge but I have found the FS algorithm to be the most robust and fast.

For the mass-univariate setting we limited the number of iterations for the FS algorithm to only 20 due to computational time.

Note that for only two repeated measures (as in your data) compound symmetry (a model with a single random effect for the intercept term) likely holds for the covariance matrix among the repeated measures. Although a likelihood ratio test here comparing the model with one random effects against the model with two random effects is barely significant it will not likely survive a multiple comparisons correction.

You can not impose structure on D in our toolbox nor it is recommended for general longitudinal data.

Let me know any doubt you might have.

Best
-Jorge
------------------------------------------------------
Subject: issue about LME Matlab tools 
Sent: Tue, Dec 11, 2012 14:47:14 

Dear Dr. Sabuncu

Your recent work "Statistical Analysis of Longitudinal Neuroimage Date with Linear Mixed Effects Models" provided us a great matlab toolbox to apply Mixed Model, especially for imaging data. Now, I am investigating the intraclass correlation based on this toolbox. Sometime I found the function "lme_fit_FS" could not get the accurate estimations. I think the problem may be relevant to the initial value from OLS method, in the case that the within-subject variability estimated from "lme_fit_init" is very close to zero. 
I attached an example. Y is test-retest imaging data for one voxel, X is design matrix including intercept, head_motion, age, gender. I set random effect for intercept and head_motion. I also attached result from SAS and the model is ok.

stats = lme_fit_FS(X,[1,2],Y,ni);

Here I'm wondering is there any way to fixed this in matlab?

PS, though you have mentioned that no imposed structure on D (covariance matrix of random effect), I am curious if it is possible to define the structure of D in this toolbox.

Thanks for your kind attention and look forward to your reply soon. 

Regards, Ting








_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.





--

Xu,Ting
Postdoc
Laboratory for Functional Connectome and Development (LFCD)
Institute of Psychology, Chinese Academy of Sciences
Beijing, China, 100101
Email: xutingxt@gmail.com; xuting@psych.ac.cn