Hi Jorge,
I have read the previous posts and applied it for my analysis which is
longitudinal study go control and patient groups. I have a control group
(n=19) with 2.87 ± 0.3 years time difference between scans. and patient
group (n=16) who have 1.31 ± 0.6 years time difference. I followed your
instructions first in each group separately , for example in control group
I have read the data:
1-Read your label eg.:

*lhcortex =
fs_read_label('freesurfer/subjects/fsaverage/label/lh.cortex.label'); *
2-Read the data file eg.:
*[lhY, lhmri] = fs_read_Y('lh.thickness.mgh');*

Then X which is 38x2 double , first column is all ones and second is 0 and
time difference every one row for each subject , so I want to see thickness
change so I used :
3-Fit a vertex-wise lme model with two random effects for the intercept
term and time eg.:
*lhstats1 = lme_mass_fit_vw(X, [1 2], lhY, ni, lhcortex);*

Having first column as all ones and second the time difference , I made the
contrast to look at thickness changes within group:
*CM.C = [1 0];*

4-Perform vertex-wise inferences  eg.:
*F_lhstats = lme_mass_F(lhstats1, CM);*

5-Save results eg.:
*fs_write_fstats(F_lhstats, lhmri,' sig.mgh', 'sig'); *

*Would you please let me know if the approach is correct ? and if I want to
add the patient group should I do the same just change the contrast ?*

*Best regards,*

Best regards,
Amirhossein Manzouri




On Fri, Mar 13, 2015 at 5:52 PM, Jon Alan Wieser <wie...@uwm.edu> wrote:

>
>  ------------------------------
> *From:* Jon Alan Wieser
> *Sent:* Tuesday, December 30, 2014 8:11 PM
> *To:* jorge luis
> *Cc:* Kristin Elizabeth Maple
> *Subject:* Re: [Freesurfer] longitudinal statistics LGI
>
>
> Hi Jorge,
>
> Following your instructions, so far we have done the following:
>
> 1-Read your label
>
> lhcortex =
> fs_read_label('freesurfer/subjects/fsaverage/label/lh.cortex.label');
>
> 2-Read the data file
>
> [lhY, lhmri] = fs_read_Y('lh.thickness.mgh');
>
> 3-Fit a vertex-wise lme model with two random effects for the intercept
> term and time eg.:
>
> lhstats1 = lme_mass_fit_vw(X, [1 2], lhY, ni, lhcortex);
>
> 4-Fit a vertex-wise lme model with two random effects for the intercept
> term and cannabis use eg.:
>
> lhstats2 = lme_mass_fit_vw(X, [1 3], lhY, ni, lhcortex);
>
> lhstats3 = lme_mass_fit_vw(X, [1 2 6], lhY, ni, lhcortex);
>    %intercept_time_gender
>
> lhstats4 = lme_mass_fit_vw(X, [1 2 7], lhY, ni, lhcortex);
>     %intercept_time_age
>
> lhstats5 = lme_mass_fit_vw(X, [1 2 3 6 ], lhY, ni, lhcortex);
>  %intercept_time_cannabis_gender
>
> We displayed the lREML data on the surface models in matlab.  In some
> cases,(when there were 3 or more effects ( i.e. 1 2 6) )  the lreml values
> had real and imaginary values, so I displayed the ABS value  of the lreml
>
>
>
> We need to know the following:
>
> 1.       How do we model this:
>
> Intercept, time, age, gender, Alcohol, other drugs vs.
>
> Intercept, time, age, Gender, Alcohol, Other drug, cannabis
>
> 2.       Correct for multiple comparisons
>
> 3.       Open these in Freesurfer, significance maps using tksurfer ( P <
> 0.05)
>
> Is it only visual, or is there a significance test between the two models
>
>
>
> 4.       How do we get a map that demonstrates the unique effect of
> cannabis
>
> 5.       What Contrast matrix do we use for the LME_mass_F program
>
>
>
> Thanks
>
> Jon
>
> ​
>
>
>  ------------------------------
> *From:* jorge luis <jbernal0...@yahoo.es>
> *Sent:* Wednesday, December 17, 2014 9:25 AM
> *To:* Freesurfer support list; Jon Alan Wieser
> *Cc:* Krista Lisdahl Medina; alicia.thomas....@gmail.com
> *Subject:* Re: [Freesurfer] longitudinal statistics LGI
>
>   Hi Jon
>
>   We recommend to order the columns of your design matrix in the
> following way: First, the intercept term (which is a column of ones);
> second, the time covariate; third, any time-varying covariates (eg.
> cannabis use); fourth, the group covariates of interest (eg. a binary
> variable indicating whether the subject is a patient or control) and their
> interactions with the time-varying covariates; finally any other nuisance
> time-invariant covariate (eg. gender). So your design matrix is comprised
> by the following columns:
>
>   1. Intercept (a column of ones)
>  2. Time since baseline
>  3. cannabis use (time-varying if varies over time for each subject
> during the follow-up time)
>  4. alcohol use (time-varying if varies over time for each subject during
> the follow-up time)
>  5. drug use over time (time-varying if varies over time for each subject
> during the follow-up time)
>  6. gender
>  7. age at baseline
>
>
>   There is no GUI for setting up the models. Here is an outline of the
> basic steps (with only three time points you shouldn't need more than two
> random effects):
>
>   1-Read your label eg.:
>
> *lhcortex =
> fs_read_label('freesurfer/subjects/fsaverage/label/lh.cortex.label'); *
>    2-Read the data file eg.:
>   *[lhY, lhmri] = fs_read_Y('lh.thickness.mgh');*
>
>    3-Fit a vertex-wise lme model with two random effects for the
> intercept term and time eg.:
>   *lhstats1 = lme_mass_fit_vw(X, [1 2], lhY, ni, lhcortex);*
>
>   4-Fit a vertex-wise lme model with two random effects for the intercept
> term and cannabis use eg.:
>  *lhstats2 = lme_mass_fit_vw(X, [1 3], lhY, ni, lhcortex);*
>
>   And so on with other time-variying covariates...
>
>  Now see which model fit produces the best lreml values across vertices
> in general and then:
>
>   4-Perform vertex-wise inferences using the winner model eg.:
>   *CM.C = [your contrast matrix];*
>  *F_lhstats = lme_mass_F(lhstats_winner, CM);*
>
>   5-Save results eg.:
>
> * fs_write_fstats(F_lhstats, lhmri,' sig.mgh', 'sig'); *
>
>
>  -Jorge
>
>   ------------------------------
> *De:* Jon Alan Wieser <wie...@uwm.edu>
> *Para:* jorge luis <jbernal0...@yahoo.es>; Freesurfer support list <
> freesurfer@nmr.mgh.harvard.edu>
> *CC:* Krista Lisdahl Medina <krista.med...@gmail.com>; "
> alicia.thomas....@gmail.com" <alicia.thomas....@gmail.com>
> *Enviado:* Martes 16 de diciembre de 2014 15:24
> *Asunto:* Re: [Freesurfer] longitudinal statistics LGI
>
>   Jorge,
>
> We are interested in examining the impact of cannabis exposure
> (time-varying continuous variable) on local gyrification index over 3 time
> points (baseline, 18 month, 36 month)- so this is a time-varying random
> effect. I apologize in advance if these are student questions… we are
> novices here…
>
> From what you said previously, we would want to model intercept+time, vs
> intercept+cannabis use, vs intercept+time+ cannabis use. Vs.
> intercept+time+ cannabis use.+covariates (alcohol use over time, gender,
> age, drug use over time). We are trying to figure out how to do this in
> Freesurfer/Matlab using the Wiki (
> https://surfer.nmr.mgh.harvard.edu/fswiki/LinearMixedEffectsModels).
> There is a great example in there with AD/MCI groups, but none outlining an
> example focused on time-varying continuous variables.
>
> *So with OUR question, would we organize the data as follows:*
> Intercept
> Time
> Cannabis total (changes over time)
> Alcohol total (changes over time)
> Other Drug total (changes over time)
> Gender
> Age at baseline
>
> *So, a few questions:*
> *1)*    * We need help writing the syntax for Matlab for testing the
> models (assuming linear trend was significant):*
> a.      intercept+time, vs
> b.     intercept+cannabis use, vs
> c.     intercept+time+ cannabis use. Vs.
> d.     intercept+time+ cannabis use.+covariates (alcohol use over time,
> gender, age, drug use over time)…
>                                                i.     *For example, this
> is the linear model for cortical thickness over time for the groups example*:
> Yij = ß1 + ß2*tij + ß3*t²ij + ß4*sMCIi + ß5*sMCIi*tij + ß6*sMCIi*t²ij + ß7
> *cMCIi + ß8*cMCIi*tij + ß9*cMCIi*t²ij + ß10*ADi + ß11*ADi*tij + ß12*ADi*t²
> ij + ß13*E4i + ß14*E4i*tij + ß15*Genderi + ß16*BslAgei + ß17*Educationi +
> b1i + b2i*tij+ eij
>                                               ii.     *This is the design
> matrix*: * [lhTh0,lhRe] = lme_mass_fit_EMinit(X,[1 2],Y,ni,lhcortex,3);*
>
>
> 2)    * Is there a GUI available* for setting up these models? (We are
> assuming there isn’t and that it is all matlab based.)
> *3)*    * Once we test these models, is it correct that we open the
> spheres representing the liklihood ratio test results (corrected for
> multiple comparisons) and pick the “best” model based on the greatest
> #/size of significant clusters?*
>
> Jon
>
>  ​
>
>   Jon Wieser
> Research Specialist
> UW-Milwaukee
> Psychology Department, Pearse Hall Rm 375
> 2441 East Hartford Ave
> Milwaukee, WI 53211
> Phone: 414-229-7145
> Fax: 414-229-5219
>
>
>
>   ------------------------------
> *From:* freesurfer-boun...@nmr.mgh.harvard.edu <
> freesurfer-boun...@nmr.mgh.harvard.edu> on behalf of jorge luis <
> jbernal0...@yahoo.es>
> *Sent:* Tuesday, December 2, 2014 12:34 PM
> *To:* Freesurfer support list
> *Subject:* Re: [Freesurfer] longitudinal statistics LGI
>
>   Hi Jon
>
>  I guess that when you say “we have continuous data as to the amount of
> drug usage” you actually mean that the amount-of-drug-usage is a continuous
> variable that changes over time for each subject. So yes you can keep this
> variable as a continuous variable. In fact it can even be a random effect
> in your statistical model. You will need to select the model with the best
> combination of random effects : intercept+time vs
> intercept+amount-of-drug-usage vs intercept+time+amount-of-drug-usage.
>
>  Actually one nice feature of the LME model implemented in freesurfer vs
> commonly used two-levels random effects models in neuroimaging is that you
> can include this type of longitudinal continuous variables in the model for
> the mean without requiring it be included in the model for the covariance
> (i.e included as a random effect). You just select the best subset of
> random effects as explained above.
>
>
>  -Jorge
>
>
>    ------------------------------
> *De:* Jon Alan Wieser <wie...@uwm.edu>
> *Para:* "freesurfer (freesurfer@nmr.mgh.harvard.edu)" <
> freesurfer@nmr.mgh.harvard.edu>
> *Enviado:* Martes 2 de diciembre de 2014 12:29
> *Asunto:* [Freesurfer] longitudinal statistics LGI
>
>   HI freesurfer experts
>  I have a question about the statistical analysis of longitudinal data.
>  we have run our data through the longtudinal data processing stream.
>   We are looking at the longitudinal  effect on the LGI data
>  We are looking at doing a Mixed effects analysis.    our  main Model
> Factor (Independent Variable) of interest is drug usage.   we have
> continuous data as to the amount of drug usage.  Can this variable be
> continous variable, or do we have to break it up into discrete levels of
> usage ( example,  low,  middle, high)
>
>  Thanks
>  Jon
>
>
>
> _______________________________________________
> 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.
>
>
>
> _______________________________________________
> 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.
>
>
>
> _______________________________________________
> 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.
>
>
_______________________________________________
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.

Reply via email to