Hi LMR
1) Yes, you should use n-1 (0/1) covariates to model n groups. Eg. (Controls, Case 1 and Case 2) the model would be:
intercept(random effect) + centered age (might be a random effect too) + Case1 + Case1 x centered age + Case2 + Case2 x centered age + sex
2)In model:
intercept(random effect) + centered age + group + group x centered age + sex
the fourth coefficient is the interaction term that represents the difference in slope between the patient and control groups. This is easy to see from your Question 1 equations. It's also easy to see from those equations that [0 1 0 0 0] tests the effect of time in the control group since the group-specific slope is only equal to the coefficient of the time covariate (the second covariate) when the group covariate is zero (i.e for the controls).
Hope this makes sense.
Best -Jorge
De: Lars M. Rimol lmr1999@hotmail.com Para: jorge luis jbernal0019@yahoo.es CC: Ørjan Bergmann orjan.bergmann@gmail.com Enviado: Lunes 16 de junio de 2014 8:25 Asunto: RE: Linear Mixed Models in FS
Hi Jorge,
I have a couple of questions which I hope you can assist us with. We have run some analyses with the model you kindly assisted us with in previous e-mails:
intercept(random
effect) + centered age + group + group x centered age + sex
We have two groups in these analyses; one control group and one patient group (Case 1), denoted 0 and 1 respectively.
- If we have more than two groups (Controls, Case 1 and Case 2), in the context of GLM we would model it like this:
Group variable 1, Group variable 2 0 0 <-- Control 1 0 <-- Case 1 0 1 <-- Case 2
Would a scheme like this be appropriate in the context of lme? In other words, do we use two columns with three groups (with controls as implicit baseline), three columns with four groups etc. Or are we supposed to have just one group column in your lme software, where the groups would be denoted by labels, e.g. 'ctrl','case1','case2' etc. (or by 1,2,3,4....)?
- We are a little puzzled by the following contrast vectors and their interpretations. Given the model above, in a previous e-mail you wrote (in red):
Question 1: Is there a significant interaction between time and group? Slope group1 (group covariate=0): coefficient of centered age Slope group2 (group covariate=1): coefficient of centered age + coefficient of group x centered age Contrast: [0 0 0 1 0]
This contrast would seem to ask the question: In which regions of the cortex is there an effect of centered age for Case 1 and no effect for controls? Is this the correct interpretation?
If you want to test if the volume tend to increase within group1 then test the coefficient (slope) of centered age>0 Contrast: [0 1 0 0 0]
Why would this contrast yield only the effect of time for group 1 (which we assume is the control group == 0) and not for both groups? Since the second column of the design matrix contains centered age for all subjects, regardless of group, wouldn't this contrast yield the effect of time irrespective of group?
And finally: If Question 1 not significant then both groups have the same slope otherwise you can test the coefficient of centered age + coefficient of group x centered age > 0 Contrast: [0 1 0 1 0]
I have tested both 0 1 0 0 0 and 0 1 0 1 0and I get very similar results for cortical surface area (figures attached). So the question is how do I interpret this. It seems to me, although I may have misunderstood, that you're saying that 0 1 0 0 0 tests the effect of time in the control group and 0 1 0 1 0 tests the effect of age in the patient group Case 1. But I don't understand why 0 1 0 0 0 doesn't test the effect of time in both groups.
And also, if 0 1 0 0 0 is the effect of time only in the control group, wouldn't 0 -1 0 1 0 (or 0 1 0 -1 0) be a better test of interaction?
Thank you!
yours, LMR
Date: Wed, 11 Jun 2014 19:09:51 +0100 From: jbernal0019@yahoo.es Subject: Re: Linear Mixed Models in FS To: lmr1999@hotmail.com
This is the standard linear mixed-effects statistical procedure, so yes it's valid and correct. Lme and SStat (a toolbox for survival data analysis) are now on github:
I'll update them when I have time.
Best -Jorge
De: Lars M. Rimol lmr1999@hotmail.com Para: jorge luis jbernal0019@yahoo.es Enviado: Miércoles 11 de junio de 2014 13:40 Asunto: RE: Linear Mixed Models in FS
Hi Jorge,
I just wanted to check with you whether this procedure is OK for analyses of cortical data. I use:
lme_mass_fit_vw.m
and then
lme_mass_F.m
I do not use any of the Regrowth functions. I know regrowth is more advanced but is the procedure I have used here valid?
Thank you!
LMR
Date: Mon, 28 Apr 2014 20:30:47 +0100 From: jbernal0019@yahoo.es Subject: Re: Linear Mixed Models in FS To: lmr1999@hotmail.com
Hi LMR
1- The effect size is usually equivalent to the absolute value of the Beta coefficient you test in your contrast for being different from zero.
2- The residual vector r at each vertex/voxel can be computed as:
r = y - X*Beta
where y is the vertex/voxel data, X is the design matrix and Beta is the estimated population regresion coefficients at that vertex/voxel.
Best -Jorge
El Lunes 28 de abril de 2014 9:32, Lars M. Rimol lmr1999@hotmail.com escribió:
Hi Jorge,
- I'm looking for a way to obtain effect size estimates from the lme longitudinal analyses. So for instance, for the effect of time in a model that is:
intercept(random
effect) + centered age + group + group x centered age + sex
With a contrast vector that is [0 1 0 0 0] I would like to obtain a corresponding effect size measure.
- I would like to calculate the residuals from a linear mixed model. The residuals are part of the output from lme_fit_FS but it doesn't seem to be part of the output from lme_FSfit, lme_mass_fit_vw, or lme_mass_fit_Rgw. Could you please explain how I can calculate the residuals using values in the stat struct output from lme_mass_fit_vw?
Thank you!
LMR
freesurfer@nmr.mgh.harvard.edu