Dear Jorge and FreeSurfers,
Would you mind having a look at my set-up and advising on whether it is correct or needs changing?
I have participants with one or two scans, who are divided into two groups. I'm interested in the longitudinal effects of aging, and the difference in the effect of age on the two groups. Not all people were scanned at exactly the same age, and the interscan interval in not exactly the same for each person. Rather, the age at scan looks like a bimodal distribution around the mean 1st and 2nd timepoint.
I believe I read on the list that you should have more timepoints than random effects. I guess I should then only name one random effect (intercept).
At the moment I have my model set up as follows:
X = Intercept Group Age(at scan) Group*Age Gender [stats, st] = lme_mass_fit_vw(X,1,Y,ni,Mask,[],12);
CM.C = [0 0 0 1 0]
I guess I should then run * lme_mass_F(stats,CM);* and
*lme_mass_FDR2.* Here I am trying to look find the areas that develop differently between the two groups over the timespan we are studying. If you would be able to advise me as to whether I have set up the model wrong it would be greatly appreciated. Age in this case refers to the the age at scan time, regardless of whether it is the first or second scan, so many participants will have two distinct values in the age column.
Also, is it possible within this set-up to test the effect of age within a group, or would that require re-doing the design matrix?
Finally, is it possible to include the by-subject random slopes for the effect of age? In R (lmer) it would be something like (1+age|subject).
Best wishes y gracias,
Seán
Hi Sean
An important issue in the LME model concerns the centering of the times of measurement. It changes the interpretation of both the mean response and the variance of the random effects. If tij represents time since baseline then the subject-specific intercept coefficient ß1+b1i represents the subject-specific mean response at baseline and Var(b1i) is the between-subject variation in the mean response at baseline. On the other hand, if tij is an individual's age at the jth measurement occasion, then ß1+b1i might not have a useful interpretation since it represents the subject-specific mean response at age zero. Another choice is to center the times of measurement for all subjects at some common fixed age within the age range of the study participants (i.e. tij-a, for some fixed value a). In this case ß1+b1i represents the subject-specific mean response at the common age a and Var(b1i ) is the between-subject variation in the mean response at that age.
You should use real-valued time measurements so the first and second scan times on the same subject are always different.
In your setting you only have two measurement occasions so you can only use a single random effect. If tij represents time since baseline then you can only use a random effect for the intercept termand add age-at-baseline as an additional time-independent covariate(its value doesn't change through measurement occasions). Otherwise if tij doesn't represent time since baseline you can test whether a single random effect for the time variable works better(i.e see if it produces higher optimal likelihood values). You can specify a random effect for the slope by indicating the column of the time variable:
[stats, st] = lme_mass_fit_vw(X,3,Y,ni,Mask,[],12);
BTW it is best to order your design matrix in the following way (just for organizational purposes): X = [Intercept Age(at scan) Group Group*Age Gender] so the time-variying covariates appear first.
You don't need to re-do the design matrix to test the effect of age within a group (group-specific slope different from zero) just use the appropriate contrast.
Hope this helps
-Jorge
El Jueves 12 de diciembre de 2013 14:29, Seán Froudist Walsh froudiss@tcd.ie escribió:
Dear Jorge and FreeSurfers,
Would you mind having a look at my set-up and advising on whether it is correct or needs changing?
I have participants with one or two scans, who are divided into two groups. I'm interested in the longitudinal effects of aging, and the difference in the effect of age on the two groups. Not all people were scanned at exactly the same age, and the interscan interval in not exactly the same for each person. Rather, the age at scan looks like a bimodal distribution around the mean 1st and 2nd timepoint.
I believe I read on the list that you should have more timepoints than random effects. I guess I should then only name one random effect (intercept).
At the moment I have my model set up as follows:
X = Intercept Group Age(at scan) Group*Age Gender [stats, st] = lme_mass_fit_vw(X,1,Y,ni,Mask,[],12);
CM.C = [0 0 0 1 0]
I guess I should then run lme_mass_F(stats,CM);
and lme_mass_FDR2.
Here I am trying to look find the areas that develop differently between the two groups over the timespan we are studying. If you would be able to advise me as to whether I have set up the model wrong it would be greatly appreciated. Age in this case refers to the the age at scan time, regardless of whether it is the first or second scan, so many participants will have two distinct values in the age column.
Also, is it possible within this set-up to test the effect of age within a group, or would that require re-doing the design matrix?
Finally, is it possible to include the by-subject random slopes for the effect of age? In R (lmer) it would be something like (1+age|subject).
Best wishes y gracias,
Seán
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.
Thanks a lot Jorge, that's a big help.
On 12 December 2013 23:54, jorge luis jbernal0019@yahoo.es wrote:
Hi Sean
An important issue in the LME model concerns the centering of the times of measurement. It changes the interpretation of both the mean response and the variance of the random effects. If tij represents time since baseline then the subject-specific intercept coefficient ß1+b1i represents the subject-specific mean response at baseline and Var(b1i) is the between-subject variation in the mean response at baseline. On the other hand, if tij is an individual's age at the jth measurement occasion, then ß1+b1i might not have a useful interpretation since it represents the subject-specific mean response at age zero. Another choice is to center the times of measurement for all subjects at some common fixed age within the age range of the study participants (i.e. tij-a, for some fixed value a). In this case ß1+b1i represents the subject-specific mean response at the common age a and Var(b1i ) is the between-subject variation in the mean response at that age.
You should use real-valued time measurements so the first and second scan times on the same subject are always different.
In your setting you only have two measurement occasions so you can only use a single random effect. If tij represents time since baseline then you can only use a random effect for the intercept term and add age-at-baseline as an additional time-independent covariate (its value doesn't change through measurement occasions). Otherwise if tij doesn't represent time since baseline you can test whether a single random effect for the time variable works better (i.e see if it produces higher optimal likelihood values). You can specify a random effect for the slope by indicating the column of the time variable:
[stats, st] = lme_mass_fit_vw(X,3,Y,ni,Mask,[],12);
BTW it is best to order your design matrix in the following way (just for organizational purposes): X = [Intercept Age(at scan) Group Group*Age Gender] so the time-variying covariates appear first.
You don't need to re-do the design matrix to test the effect of age within a group (group-specific slope different from zero) just use the appropriate contrast.
Hope this helps
-Jorge
El Jueves 12 de diciembre de 2013 14:29, Seán Froudist Walsh < froudiss@tcd.ie> escribió:
Dear Jorge and FreeSurfers,
Would you mind having a look at my set-up and advising on whether it is correct or needs changing?
I have participants with one or two scans, who are divided into two groups. I'm interested in the longitudinal effects of aging, and the difference in the effect of age on the two groups. Not all people were scanned at exactly the same age, and the interscan interval in not exactly the same for each person. Rather, the age at scan looks like a bimodal distribution around the mean 1st and 2nd timepoint.
I believe I read on the list that you should have more timepoints than random effects. I guess I should then only name one random effect (intercept).
At the moment I have my model set up as follows:
X = Intercept Group Age(at scan) Group*Age Gender [stats, st] = lme_mass_fit_vw(X,1,Y,ni,Mask,[],12);
CM.C = [0 0 0 1 0]
I guess I should then run
- lme_mass_F(stats,CM); *
and
*lme_mass_FDR2.* Here I am trying to look find the areas that develop differently between the two groups over the timespan we are studying. If you would be able to advise me as to whether I have set up the model wrong it would be greatly appreciated. Age in this case refers to the the age at scan time, regardless of whether it is the first or second scan, so many participants will have two distinct values in the age column.
Also, is it possible within this set-up to test the effect of age within a group, or would that require re-doing the design matrix?
Finally, is it possible to include the by-subject random slopes for the effect of age? In R (lmer) it would be something like (1+age|subject).
Best wishes y gracias,
Seán
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.
Dear FS, I am checking on the outputs of recon-all -all using the flag -openmp 8. As I did with standard recon-all -all comand line I was trying to check brainmask.mgz, but there is not such file. Is there anything wrong with my outputs? Or I should be checking a different file? Thank you, Pablo
Hello Pablo,
Please send me the recon-all.log file for the subject and I will take a look.
-Zeke
On 12/13/2013 03:41 PM, pablo najt wrote:
Dear FS, I am checking on the outputs of recon-all -all using the flag -openmp 8. As I did with standard recon-all -all comand line I was trying to check brainmask.mgz, but there is not such file. Is there anything wrong with my outputs? Or I should be checking a different file? Thank you, Pablo
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Dear Zeke, Thank you so much. As I am not sure which is the log file that we use I am attaching mri_nu (in mri directory) and talairach_avi (in mri/transformations directory). Thanks, Pablo
Date: Fri, 13 Dec 2013 16:21:48 -0500 From: zkaufman@nmr.mgh.harvard.edu To: pablonajt@hotmail.com CC: freesurfer@nmr.mgh.harvard.edu Subject: Re: [Freesurfer] Output of recon-all -all -openmp 8 does not show brainmask.mgz
Hello Pablo,
Please send me the recon-all.log file for the subject and I will take a look.
-Zeke
On 12/13/2013 03:41 PM, pablo najt wrote:
Dear FS, I am checking on the outputs of recon-all -all using the flag -openmp 8. As I did with standard recon-all -all comand line I was trying to check brainmask.mgz, but there is not such file. Is there anything wrong with my outputs? Or I should be checking a different file? Thank you, Pablo
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.
Pablo,
I need the recon-all.log file located in the $SUBJECTS_DIR/scripts directory. Sorry for the confusion.
-Zeke
On 12/13/2013 04:48 PM, pablo najt wrote:
Dear Zeke, Thank you so much. As I am not sure which is the log file that we use I am attaching mri_nu (in mri directory) and talairach_avi (in mri/transformations directory). Thanks, Pablo
Date: Fri, 13 Dec 2013 16:21:48 -0500 From: zkaufman@nmr.mgh.harvard.edu To: pablonajt@hotmail.com CC: freesurfer@nmr.mgh.harvard.edu Subject: Re: [Freesurfer] Output of recon-all -all -openmp 8 does not
show brainmask.mgz
Hello Pablo,
Please send me the recon-all.log file for the subject and I will take a look.
-Zeke
On 12/13/2013 03:41 PM, pablo najt wrote:
Dear FS, I am checking on the outputs of recon-all -all using the flag
-openmp 8.
As I did with standard recon-all -all comand line I was trying to check brainmask.mgz, but there is not such file. Is there anything wrong with my outputs? Or I should be checking a different file? Thank you, Pablo
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
Dear Zeke, Thank you for pointing in the right direction. As a reminder the problem was that I was not getting the brainmask.mgz file, in the meantime I tried to re run finally got it . \
However, I am surprised of the duration of recon-all -all -openmp 8 (using a linux workstation with 8 cores (2 processors with 4 each). Running 5 subjects simultaneously took up to 52 hours. 4 subjects around 40 hours.
Any way I am attaching the recon-all.log file just to be sure that there are no strange errors. Thank you so much, Pablo
Date: Mon, 16 Dec 2013 17:18:32 -0500 From: zkaufman@nmr.mgh.harvard.edu To: freesurfer@nmr.mgh.harvard.edu; pablonajt@hotmail.com Subject: Re: [Freesurfer] Output of recon-all -all -openmp 8 does not show brainmask.mgz
Pablo,
I need the recon-all.log file located in the $SUBJECTS_DIR/scripts directory. Sorry for the confusion.
-Zeke
On 12/13/2013 04:48 PM, pablo najt wrote:
Dear Zeke, Thank you so much. As I am not sure which is the log file that we use I am attaching mri_nu (in mri directory) and talairach_avi (in mri/transformations directory). Thanks, Pablo
Date: Fri, 13 Dec 2013 16:21:48 -0500 From: zkaufman@nmr.mgh.harvard.edu To: pablonajt@hotmail.com CC: freesurfer@nmr.mgh.harvard.edu Subject: Re: [Freesurfer] Output of recon-all -all -openmp 8 does not
show brainmask.mgz
Hello Pablo,
Please send me the recon-all.log file for the subject and I will take a look.
-Zeke
On 12/13/2013 03:41 PM, pablo najt wrote:
Dear FS, I am checking on the outputs of recon-all -all using the flag
-openmp 8.
As I did with standard recon-all -all comand line I was trying to check brainmask.mgz, but there is not such file. Is there anything wrong with my outputs? Or I should be checking a different file? Thank you, Pablo
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
Dear Zeke,I am forwarding the email below that I believe it got lost in the dense list of correspondences.I would highly appreciate your input.Thanks,Pablo
From: pablonajt@hotmail.com To: freesurfer@nmr.mgh.harvard.edu Date: Thu, 19 Dec 2013 15:27:11 +0000 Subject: Re: [Freesurfer] Output of recon-all -all -openmp 8 does not show brainmask.mgz
Dear Zeke, Thank you for pointing in the right direction. As a reminder the problem was that I was not getting the brainmask.mgz file, in the meantime I tried to re run finally got it . \
However, I am surprised of the duration of recon-all -all -openmp 8 (using a linux workstation with 8 cores (2 processors with 4 each). Running 5 subjects simultaneously took up to 52 hours. 4 subjects around 40 hours.
Any way I am attaching the recon-all.log file just to be sure that there are no strange errors. Thank you so much, Pablo
Date: Mon, 16 Dec 2013 17:18:32 -0500 From: zkaufman@nmr.mgh.harvard.edu To: freesurfer@nmr.mgh.harvard.edu; pablonajt@hotmail.com Subject: Re: [Freesurfer] Output of recon-all -all -openmp 8 does not show brainmask.mgz
Pablo,
I need the recon-all.log file located in the $SUBJECTS_DIR/scripts directory. Sorry for the confusion.
-Zeke
On 12/13/2013 04:48 PM, pablo najt wrote:
Dear Zeke, Thank you so much. As I am not sure which is the log file that we use I am attaching mri_nu (in mri directory) and talairach_avi (in mri/transformations directory). Thanks, Pablo
Date: Fri, 13 Dec 2013 16:21:48 -0500 From: zkaufman@nmr.mgh.harvard.edu To: pablonajt@hotmail.com CC: freesurfer@nmr.mgh.harvard.edu Subject: Re: [Freesurfer] Output of recon-all -all -openmp 8 does not
show brainmask.mgz
Hello Pablo,
Please send me the recon-all.log file for the subject and I will take a look.
-Zeke
On 12/13/2013 03:41 PM, pablo najt wrote:
Dear FS, I am checking on the outputs of recon-all -all using the flag
-openmp 8.
As I did with standard recon-all -all comand line I was trying to check brainmask.mgz, but there is not such file. Is there anything wrong with my outputs? Or I should be checking a different file? Thank you, Pablo
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
_______________________________________________ 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.
Pablo,
I do not see the attachment. It may have been filtered because the freesurfer list has fairly strict file attachment size restrictions. Feel free to send me the recon-all.log directly at zkaufman@nmr.mgh.harvard.edu
However, depending on the processor, I am not surprised your ~10hr runtime per subject timeline. Based on documentation that I have seen, you can really only expect about 25% decrease in the time it takes to run recon-all when using the "openmp -8" flag. This because only some parts of the freesurfer code are parallelized. Which means that if you were not using the openmp flag, you should be having about 13.33hrs/subject, which is a valid ballpark estimate of the time it takes to run the recon-all stream on todays machines.
-Zeke
On 01/09/2014 11:44 AM, pablo najt wrote:
Dear Zeke, I am forwarding the email below that I believe it got lost in the dense list of correspondences. I would highly appreciate your input. Thanks, Pablo
From: pablonajt@hotmail.com To: freesurfer@nmr.mgh.harvard.edu Date: Thu, 19 Dec 2013 15:27:11 +0000 Subject: Re: [Freesurfer] Output of recon-all -all -openmp 8 does not show brainmask.mgz
Dear Zeke, Thank you for pointing in the right direction. As a reminder the problem was that I was not getting the brainmask.mgz file, in the meantime I tried to re run finally got it . \
However, I am surprised of the duration of recon-all -all -openmp 8 (using a linux workstation with 8 cores (2 processors with 4 each). Running 5 subjects simultaneously took up to 52 hours. 4 subjects around 40 hours.
Any way I am attaching the recon-all.log file just to be sure that there are no strange errors. Thank you so much, Pablo
Date: Mon, 16 Dec 2013 17:18:32 -0500 From: zkaufman@nmr.mgh.harvard.edu To: freesurfer@nmr.mgh.harvard.edu; pablonajt@hotmail.com Subject: Re: [Freesurfer] Output of recon-all -all -openmp 8 does not
show brainmask.mgz
Pablo,
I need the recon-all.log file located in the $SUBJECTS_DIR/scripts directory. Sorry for the confusion.
-Zeke
On 12/13/2013 04:48 PM, pablo najt wrote:
Dear Zeke, Thank you so much. As I am not sure which is the log file that we use I am attaching mri_nu (in mri directory) and talairach_avi (in mri/transformations directory). Thanks, Pablo
Date: Fri, 13 Dec 2013 16:21:48 -0500 From: zkaufman@nmr.mgh.harvard.edu To: pablonajt@hotmail.com CC: freesurfer@nmr.mgh.harvard.edu Subject: Re: [Freesurfer] Output of recon-all -all -openmp 8 does not
show brainmask.mgz
Hello Pablo,
Please send me the recon-all.log file for the subject and I will
take a
look.
-Zeke
On 12/13/2013 03:41 PM, pablo najt wrote:
Dear FS, I am checking on the outputs of recon-all -all using the flag
-openmp 8.
As I did with standard recon-all -all comand line I was trying
to check
brainmask.mgz, but there is not such file. Is there anything
wrong with
my outputs? Or I should be checking a different file? Thank you, Pablo
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
_______________________________________________ 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
freesurfer@nmr.mgh.harvard.edu