Re: [Freesurfer] Contrast matrix for PVR

2017-09-05 Thread Douglas N Greve


On 08/31/2017 02:30 PM, Martin Juneja wrote:
> Hi experts,
>
> I have a follow up question:
> In case I wanted to add another covariate in contrast matrix e.g. in 
> addition to age and gender if I want to add BMI as another covariate 
> in calculating correlation between volume and LGI (as mentioned in 
> previous email), could you please confirm if following contrast matrix 
> is correct:
>
> *0 0 0 0 0 0 1*
>
that is correct
> for FSGD:
>
> GroupDescriptorFile 1
>
> Class Male
>
> Class Female
>
> Variables Age BMI
>
> Inputzerek1 Male 21 17
>
> Input zerek2 Male 25 19
>
> etc.
>
> If that's the correct matrix, could you please briefly explain how 
> this matrix explains the effect of age, sex and BMI i.e. how does each 
> zero and 1 explain the correlation between volume and LGI and removes 
> the effect of age, sex and BMI?
This is a contrast matrix, so it does not explain anything. It is the 
columns in the design matrix that will explain effects. Each column 
means something and each column gets a regression coefficient. By 
setting the corresponding value in the contrast mat to 0 you tell 
mri_glmfit to to fit/account for that column in the design but do not  
include it in the contrast
>
> Thanks.
>
> On Tue, May 16, 2017 at 8:31 AM, Douglas Greve 
> > wrote:
>
> The 2nd is the correct matrix
>
>
> On 5/15/17 12:36 PM, Sahil Bajaj wrote:
>>
>> Hi everyone,
>>
>> From FreeSurfer manual and discussion forum, I found that volume
>> and LGI can be correlated using mri_glmfit command with -pvr flag.
>>
>> For that, my fsgd file has age, gender as covariates and the file
>> is as following:
>>
>> GroupDescriptorFile 1
>>
>> Class Male
>>
>> Class Female
>>
>> Variables Age
>>
>> Inputzerek1 Male 21
>>
>> Input zerek2 Male 25
>>
>> etc.
>>
>> My concern is:
>>
>> To run mri_glmfit command, I am not sure how to define my
>> contrast matrixif I am interested in removing the effect of age
>> and sex.
>>
>> 1st option I tried is: 0 0.5 0.5 0 1
>>
>> Here, I think first 0 regresses out age, 0.5 0.5 should be
>> averaging over males and females and last 0 1 correlates between
>> volume and LGI. But this looks like it is not giving me correct
>> correlations maps, although there is no error.
>>
>> 2nd option I tried is: 0 0 0 0 1
>>
>> This looks like its working and maps look correct to me
>> but I want to make sure this is the correct contrast matrix and
>> I am not sure how this matrix is regressing out age and gender or
>> 1st option is correct contrast matrix?
>>
>> Thank you so much !
>>
>> Best,
>>
>> Sahil
>>
>>
>>
>> ___
>> 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

-- 
Douglas N. Greve, Ph.D.
MGH-NMR Center
gr...@nmr.mgh.harvard.edu
Phone Number: 617-724-2358
Fax: 617-726-7422

Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
FileDrop: https://gate.nmr.mgh.harvard.edu/filedrop2
www.nmr.mgh.harvard.edu/facility/filedrop/index.html
Outgoing: ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/

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


Re: [Freesurfer] Contrast matrix for PVR

2017-08-31 Thread Martin Juneja
Hi experts,

I have a follow up question:
In case I wanted to add another covariate in contrast matrix e.g. in
addition to age and gender if I want to add BMI as another covariate in
calculating correlation between volume and LGI (as mentioned in previous
email), could you please confirm if following contrast matrix is correct:

*0 0 0 0 0 0 1*

for FSGD:

GroupDescriptorFile 1

Class Male

Class Female

Variables Age BMI

Inputzerek1 Male 21 17

Input zerek2 Male 25 19

etc.
If that's the correct matrix, could you please briefly explain how this
matrix explains the effect of age, sex and BMI i.e. how does each zero and
1 explain the correlation between volume and LGI and removes the effect of
age, sex and BMI?

Thanks.

On Tue, May 16, 2017 at 8:31 AM, Douglas Greve 
wrote:

> The 2nd is the correct matrix
>
> On 5/15/17 12:36 PM, Sahil Bajaj wrote:
>
> Hi everyone,
>
> From FreeSurfer manual and discussion forum, I found that volume and LGI
> can be correlated using mri_glmfit command with -pvr flag.
>
> For that, my fsgd file has age, gender as covariates and the file is as
> following:
>
> GroupDescriptorFile 1
>
> Class Male
>
> Class Female
>
> Variables Age
>
> Inputzerek1 Male 21
>
> Input zerek2 Male 25
>
> etc.
>
> My concern is:
>
> To run mri_glmfit command, I am not sure how to define my contrast matrix
> if I am interested in removing the effect of age and sex.
>
> 1st option I tried is: 0 0.5 0.5 0 1
>
> Here, I think first 0 regresses out age, 0.5 0.5 should be averaging over
> males and females and last 0 1 correlates between volume and LGI. But this
> looks like it is not giving me correct correlations maps, although there is
> no error.
>
> 2nd option I tried is: 0 0 0 0 1
>
> This looks like its working and maps look correct to me but I want to
> make sure this is the correct contrast matrix and I am not sure how this
> matrix is regressing out age and gender or 1st option is correct contrast
> matrix?
>
> Thank you so much !
>
> Best,
>
> Sahil
>
>
> ___
> Freesurfer mailing 
> listfreesur...@nmr.mgh.harvard.eduhttps://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


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.


Re: [Freesurfer] Contrast matrix format {Disarmed}

2017-06-01 Thread Hilton, Benjamin Taylor
I'm comparing to the cluster-wise p-value in the cluster summary file from 
mri_glmfit-sim.  We are running mri_glmfit and then using that output for 
mri_glmfit-sim to determine significant clusters.  It should be the same matrix 
though just to be certain I just ran mri_glmfit with just the subjects in the 
relevant groups (contrasted groups only) and it turns up only one cluster in 
the same location as the original first cluster but slightly smaller.  I did 
this in case the other groups weren't being handled as expected.


The linear regression in R makes the matrix for you given two groups.  I've 
verified that the same groups are given for each participant between the linear 
regression and mri_glmfit.  The contrast matrix looks correct, it gives a +1 
for when the participant is in the group and a +0 when not with two columns for 
the two groups.


From: freesurfer-boun...@nmr.mgh.harvard.edu 
<freesurfer-boun...@nmr.mgh.harvard.edu> on behalf of Douglas N Greve 
<gr...@nmr.mgh.harvard.edu>
Sent: Wednesday, May 31, 2017 3:12:43 PM
To: freesurfer@nmr.mgh.harvard.edu
Subject: Re: [Freesurfer] Contrast matrix format {Disarmed}

What p-values are you comparing to? You should run the analysis with
mri_glmfit.m Are you sure that the design matrix is exactly the same in
R? The design matrix in Xg.dat



On 05/31/2017 02:10 PM, Hilton, Benjamin Taylor wrote:
>
> Sorry I don't think I've been very clear, got off on a tangent about
> the program before that sort of sidestepped the original question.
>
>
> We're running a linear regression in R with the individual values from
> the cache.th40.neg.y.ocn.dat file, with values of one cluster as the
> dependent variable and our study groups as the independent variable.
>
>
> The R format being lm(cluster ~ groups).
>
>
> This analysis is showing p values well above .05 (.233 and 0.887, for
> clusters 1 and 2 respectively, of the left hemisphere), even though
> the clusters are supposed to be significantly different between our
> groups according to the output of mri_glmfit-sim .  I'd like to know
> if there's some covariate left out of the analysis, or am I looking at
> the wrong individual values perhaps?  We are hoping to get the value
> of the cortical thickness for each individual subject in a
> specific cluster.
>
> 
> *From:* freesurfer-boun...@nmr.mgh.harvard.edu
> <freesurfer-boun...@nmr.mgh.harvard.edu> on behalf of Douglas N Greve
> <gr...@nmr.mgh.harvard.edu>
> *Sent:* Friday, May 26, 2017 5:38:35 PM
> *To:* freesurfer@nmr.mgh.harvard.edu
> *Subject:* Re: [Freesurfer] Contrast matrix format {Disarmed}
> Aren't your p-values sig? They are both in the range of .0001
>
>
> On 05/26/2017 02:23 PM, Hilton, Benjamin Taylor wrote:
> >
> > Okay but if we run a simple regression analysis on the mean values
> > between groups for the clusters which mri_glmfit-sim found significant
> > between groups, why isn't that significant?  Are we leaving a
> > covariate out?
> >
> > 
> > *From:* freesurfer-boun...@nmr.mgh.harvard.edu
> > <freesurfer-boun...@nmr.mgh.harvard.edu> on behalf of Douglas N Greve
> > <gr...@nmr.mgh.harvard.edu>
> > *Sent:* Friday, May 26, 2017 12:50:07 PM
> > *To:* freesurfer@nmr.mgh.harvard.edu
> > *Subject:* Re: [Freesurfer] Contrast matrix format {Disarmed}
> > It does not matter whether you used the maxvox or the mean of the
> > cluster. The two p-values are measuring fundamentally different
> > phenomena. The cluster pvalue is measuring the likelihood of seeing a
> > cluster of that size by chance. The p-value you have computed is the
> > likelihood of seeing a mean value in the cluster greater than 0.
> >
> >
> > On 05/26/2017 12:43 PM, Hilton, Benjamin Taylor wrote:
> > >
> > > I was trying to follow along with the suggestion you provided someone
> > > else here:
> > >
> >
> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.mail-archive.com%2Ffreesurfer%40nmr.mgh.harvard.edu%2Fmsg32951.html=01%7C01%7CBTH22%40pitt.edu%7C162aa8b59e2d486a45eb08d4a4574e88%7C9ef9f489e0a04eeb87cc3a526112fd0d%7C1=UCKGxK2ewtC%2FzM%2BAbSKS2Ths5fJkGft1SxDX1ezEwQg%3D=0
> > >
> > >
> > > I'm not sure how relevant that solution is to my problem though, and
> > > I'm pulling values from the "cache.th40.neg.y.ocn.dat" file which is
> > > output by the mri_glmfit-sim method.  I believe this has the mean
> > > cluster value for each subject and each cluster. I am comparing the
> > > p-values to the clus

Re: [Freesurfer] Contrast matrix format {Disarmed}

2017-05-31 Thread Douglas N Greve
What p-values are you comparing to? You should run the analysis with 
mri_glmfit.m Are you sure that the design matrix is exactly the same in 
R? The design matrix in Xg.dat



On 05/31/2017 02:10 PM, Hilton, Benjamin Taylor wrote:
>
> Sorry I don't think I've been very clear, got off on a tangent about 
> the program before that sort of sidestepped the original question.
>
>
> We're running a linear regression in R with the individual values from 
> the cache.th40.neg.y.ocn.dat file, with values of one cluster as the 
> dependent variable and our study groups as the independent variable.
>
>
> The R format being lm(cluster ~ groups).
>
>
> This analysis is showing p values well above .05 (.233 and 0.887, for 
> clusters 1 and 2 respectively, of the left hemisphere), even though 
> the clusters are supposed to be significantly different between our 
> groups according to the output of mri_glmfit-sim .  I'd like to know 
> if there's some covariate left out of the analysis, or am I looking at 
> the wrong individual values perhaps?  We are hoping to get the value 
> of the cortical thickness for each individual subject in a 
> specific cluster.
>
> 
> *From:* freesurfer-boun...@nmr.mgh.harvard.edu 
> <freesurfer-boun...@nmr.mgh.harvard.edu> on behalf of Douglas N Greve 
> <gr...@nmr.mgh.harvard.edu>
> *Sent:* Friday, May 26, 2017 5:38:35 PM
> *To:* freesurfer@nmr.mgh.harvard.edu
> *Subject:* Re: [Freesurfer] Contrast matrix format {Disarmed}
> Aren't your p-values sig? They are both in the range of .0001
>
>
> On 05/26/2017 02:23 PM, Hilton, Benjamin Taylor wrote:
> >
> > Okay but if we run a simple regression analysis on the mean values
> > between groups for the clusters which mri_glmfit-sim found significant
> > between groups, why isn't that significant?  Are we leaving a
> > covariate out?
> >
> > 
> > *From:* freesurfer-boun...@nmr.mgh.harvard.edu
> > <freesurfer-boun...@nmr.mgh.harvard.edu> on behalf of Douglas N Greve
> > <gr...@nmr.mgh.harvard.edu>
> > *Sent:* Friday, May 26, 2017 12:50:07 PM
> > *To:* freesurfer@nmr.mgh.harvard.edu
> > *Subject:* Re: [Freesurfer] Contrast matrix format {Disarmed}
> > It does not matter whether you used the maxvox or the mean of the
> > cluster. The two p-values are measuring fundamentally different
> > phenomena. The cluster pvalue is measuring the likelihood of seeing a
> > cluster of that size by chance. The p-value you have computed is the
> > likelihood of seeing a mean value in the cluster greater than 0.
> >
> >
> > On 05/26/2017 12:43 PM, Hilton, Benjamin Taylor wrote:
> > >
> > > I was trying to follow along with the suggestion you provided someone
> > > else here:
> > >
> > 
> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.mail-archive.com%2Ffreesurfer%40nmr.mgh.harvard.edu%2Fmsg32951.html=01%7C01%7CBTH22%40pitt.edu%7C162aa8b59e2d486a45eb08d4a4574e88%7C9ef9f489e0a04eeb87cc3a526112fd0d%7C1=UCKGxK2ewtC%2FzM%2BAbSKS2Ths5fJkGft1SxDX1ezEwQg%3D=0
> > >
> > >
> > > I'm not sure how relevant that solution is to my problem though, and
> > > I'm pulling values from the "cache.th40.neg.y.ocn.dat" file which is
> > > output by the mri_glmfit-sim method.  I believe this has the mean
> > > cluster value for each subject and each cluster. I am comparing the
> > > p-values to the cluster wise p-values.
> > >
> > > 
> 
> > > *From:* freesurfer-boun...@nmr.mgh.harvard.edu
> > > <freesurfer-boun...@nmr.mgh.harvard.edu> on behalf of Douglas N Greve
> > > <gr...@nmr.mgh.harvard.edu>
> > > *Sent:* Thursday, May 25, 2017 6:06:30 PM
> > > *To:* freesurfer@nmr.mgh.harvard.edu
> > > *Subject:* Re: [Freesurfer] Contrast matrix format {Disarmed}
> > > Not sure what you did. Sound like you found the max vox from the
> > > cluster, then extracted the values from each subject and ran those
> > > values through the glm to compare p-values against those in the 
> summary
> > > file. Right? Now, which values from the summary file are you comparing
> > > against? The cluster-wise p-value is the p-value of the cluster, 
> not of
> > > a voxel in the cluster. The cluster p-values is the chance that 
> you see
> > > a cluster of that size by chance.
> > >
> > >
> > > On 05/25/2017 03:06 PM, Hilton, Benjamin Taylor w

Re: [Freesurfer] Contrast matrix format {Disarmed}

2017-05-31 Thread Hilton, Benjamin Taylor
Sorry I don't think I've been very clear, got off on a tangent about the 
program before that sort of sidestepped the original question.


We're running a linear regression in R with the individual values from the 
cache.th40.neg.y.ocn.dat file, with values of one cluster as the dependent 
variable and our study groups as the independent variable.


The R format being lm(cluster ~ groups).


This analysis is showing p values well above .05 (.233 and 0.887, for clusters 
1 and 2 respectively, of the left hemisphere), even though the clusters are 
supposed to be significantly different between our groups according to the 
output of mri_glmfit-sim .  I'd like to know if there's some covariate left out 
of the analysis, or am I looking at the wrong individual values perhaps?  We 
are hoping to get the value of the cortical thickness for each individual 
subject in a specific cluster.


From: freesurfer-boun...@nmr.mgh.harvard.edu 
<freesurfer-boun...@nmr.mgh.harvard.edu> on behalf of Douglas N Greve 
<gr...@nmr.mgh.harvard.edu>
Sent: Friday, May 26, 2017 5:38:35 PM
To: freesurfer@nmr.mgh.harvard.edu
Subject: Re: [Freesurfer] Contrast matrix format {Disarmed}

Aren't your p-values sig? They are both in the range of .0001


On 05/26/2017 02:23 PM, Hilton, Benjamin Taylor wrote:
>
> Okay but if we run a simple regression analysis on the mean values
> between groups for the clusters which mri_glmfit-sim found significant
> between groups, why isn't that significant?  Are we leaving a
> covariate out?
>
> 
> *From:* freesurfer-boun...@nmr.mgh.harvard.edu
> <freesurfer-boun...@nmr.mgh.harvard.edu> on behalf of Douglas N Greve
> <gr...@nmr.mgh.harvard.edu>
> *Sent:* Friday, May 26, 2017 12:50:07 PM
> *To:* freesurfer@nmr.mgh.harvard.edu
> *Subject:* Re: [Freesurfer] Contrast matrix format {Disarmed}
> It does not matter whether you used the maxvox or the mean of the
> cluster. The two p-values are measuring fundamentally different
> phenomena. The cluster pvalue is measuring the likelihood of seeing a
> cluster of that size by chance. The p-value you have computed is the
> likelihood of seeing a mean value in the cluster greater than 0.
>
>
> On 05/26/2017 12:43 PM, Hilton, Benjamin Taylor wrote:
> >
> > I was trying to follow along with the suggestion you provided someone
> > else here:
> >
> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.mail-archive.com%2Ffreesurfer%40nmr.mgh.harvard.edu%2Fmsg32951.html=01%7C01%7CBTH22%40pitt.edu%7C162aa8b59e2d486a45eb08d4a4574e88%7C9ef9f489e0a04eeb87cc3a526112fd0d%7C1=UCKGxK2ewtC%2FzM%2BAbSKS2Ths5fJkGft1SxDX1ezEwQg%3D=0
> >
> >
> > I'm not sure how relevant that solution is to my problem though, and
> > I'm pulling values from the "cache.th40.neg.y.ocn.dat" file which is
> > output by the mri_glmfit-sim method.  I believe this has the mean
> > cluster value for each subject and each cluster.  I am comparing the
> > p-values to the cluster wise p-values.
> >
> > 
> > *From:* freesurfer-boun...@nmr.mgh.harvard.edu
> > <freesurfer-boun...@nmr.mgh.harvard.edu> on behalf of Douglas N Greve
> > <gr...@nmr.mgh.harvard.edu>
> > *Sent:* Thursday, May 25, 2017 6:06:30 PM
> > *To:* freesurfer@nmr.mgh.harvard.edu
> > *Subject:* Re: [Freesurfer] Contrast matrix format {Disarmed}
> > Not sure what you did. Sound like you found the max vox from the
> > cluster, then extracted the values from each subject and ran those
> > values through the glm to compare p-values against those in the summary
> > file. Right? Now, which values from the summary file are you comparing
> > against? The cluster-wise p-value is the p-value of the cluster, not of
> > a voxel in the cluster. The cluster p-values is the chance that you see
> > a cluster of that size by chance.
> >
> >
> > On 05/25/2017 03:06 PM, Hilton, Benjamin Taylor wrote:
> > >
> > > Running that code it turns up these values:
> > >
> > >
> > > pvalues =
> > >
> > >1.0e-04 *
> > >
> > > 0.2084    0.1849
> > >
> > > While the p-values are 0.1340 and 0.02200 respectively in the summary
> > > file, why the difference?
> > >
> 
> > > *From:* Hilton, Benjamin Taylor
> > > *Sent:* Thursday, May 25, 2017 2:43:35 PM
> > > *To:* freesurfer@nmr.mgh.harvard.edu
> > > *Subject:* Re: [Freesurfer] Contrast matrix format
> > >

Re: [Freesurfer] Contrast matrix format {Disarmed}

2017-05-26 Thread Douglas N Greve
Aren't your p-values sig? They are both in the range of .0001


On 05/26/2017 02:23 PM, Hilton, Benjamin Taylor wrote:
>
> Okay but if we run a simple regression analysis on the mean values 
> between groups for the clusters which mri_glmfit-sim found significant 
> between groups, why isn't that significant?  Are we leaving a 
> covariate out?
>
> 
> *From:* freesurfer-boun...@nmr.mgh.harvard.edu 
> <freesurfer-boun...@nmr.mgh.harvard.edu> on behalf of Douglas N Greve 
> <gr...@nmr.mgh.harvard.edu>
> *Sent:* Friday, May 26, 2017 12:50:07 PM
> *To:* freesurfer@nmr.mgh.harvard.edu
> *Subject:* Re: [Freesurfer] Contrast matrix format {Disarmed}
> It does not matter whether you used the maxvox or the mean of the
> cluster. The two p-values are measuring fundamentally different
> phenomena. The cluster pvalue is measuring the likelihood of seeing a
> cluster of that size by chance. The p-value you have computed is the
> likelihood of seeing a mean value in the cluster greater than 0.
>
>
> On 05/26/2017 12:43 PM, Hilton, Benjamin Taylor wrote:
> >
> > I was trying to follow along with the suggestion you provided someone
> > else here:
> > 
> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.mail-archive.com%2Ffreesurfer%40nmr.mgh.harvard.edu%2Fmsg32951.html=01%7C01%7CBTH22%40pitt.edu%7C162aa8b59e2d486a45eb08d4a4574e88%7C9ef9f489e0a04eeb87cc3a526112fd0d%7C1=UCKGxK2ewtC%2FzM%2BAbSKS2Ths5fJkGft1SxDX1ezEwQg%3D=0
> >
> >
> > I'm not sure how relevant that solution is to my problem though, and
> > I'm pulling values from the "cache.th40.neg.y.ocn.dat" file which is
> > output by the mri_glmfit-sim method.  I believe this has the mean
> > cluster value for each subject and each cluster.  I am comparing the
> > p-values to the cluster wise p-values.
> >
> > 
> > *From:* freesurfer-boun...@nmr.mgh.harvard.edu
> > <freesurfer-boun...@nmr.mgh.harvard.edu> on behalf of Douglas N Greve
> > <gr...@nmr.mgh.harvard.edu>
> > *Sent:* Thursday, May 25, 2017 6:06:30 PM
> > *To:* freesurfer@nmr.mgh.harvard.edu
> > *Subject:* Re: [Freesurfer] Contrast matrix format {Disarmed}
> > Not sure what you did. Sound like you found the max vox from the
> > cluster, then extracted the values from each subject and ran those
> > values through the glm to compare p-values against those in the summary
> > file. Right? Now, which values from the summary file are you comparing
> > against? The cluster-wise p-value is the p-value of the cluster, not of
> > a voxel in the cluster. The cluster p-values is the chance that you see
> > a cluster of that size by chance.
> >
> >
> > On 05/25/2017 03:06 PM, Hilton, Benjamin Taylor wrote:
> > >
> > > Running that code it turns up these values:
> > >
> > >
> > > pvalues =
> > >
> > >1.0e-04 *
> > >
> > > 0.2084    0.1849
> > >
> > > While the p-values are 0.1340 and 0.02200 respectively in the summary
> > > file, why the difference?
> > > 
> 
> > > *From:* Hilton, Benjamin Taylor
> > > *Sent:* Thursday, May 25, 2017 2:43:35 PM
> > > *To:* freesurfer@nmr.mgh.harvard.edu
> > > *Subject:* Re: [Freesurfer] Contrast matrix format
> > >
> > > After some digging I found this thread where someone was having a
> > > similar issue, so I can give this matlab code you posted a try.
> > >
> > >
> > >
> > 
> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.mail-archive.com%2Ffreesurfer%40nmr.mgh.harvard.edu%2Fmsg32951.html=01%7C01%7CBTH22%40pitt.edu%7C1ff1026c69bb4920a63108d4a3ba5aea%7C9ef9f489e0a04eeb87cc3a526112fd0d%7C1=XWWDmJEGLqPk68a1730xVmNBLROYJNCnQGeSxtlNm1s%3D=0
> > >
> > > 
> 
> > > *From:* freesurfer-boun...@nmr.mgh.harvard.edu
> > > <freesurfer-boun...@nmr.mgh.harvard.edu> on behalf of Douglas Greve
> > > <gr...@nmr.mgh.harvard.edu>
> > > *Sent:* Wednesday, May 24, 2017 10:47:24 AM
> > > *To:* freesurfer@nmr.mgh.harvard.edu
> > > *Subject:* Re: [Freesurfer] Contrast matrix format
> > >
> > > yes, that is correct
> > >
> > >
> > > On 5/24/17 10:38 AM, Taylor Hilton wrote:
> > >> Hi all,
> > >>
> > >> I’m trying to perform a

Re: [Freesurfer] Contrast matrix format {Disarmed}

2017-05-26 Thread Hilton, Benjamin Taylor
Okay but if we run a simple regression analysis on the mean values between 
groups for the clusters which mri_glmfit-sim found significant between groups, 
why isn't that significant?  Are we leaving a covariate out?


From: freesurfer-boun...@nmr.mgh.harvard.edu 
<freesurfer-boun...@nmr.mgh.harvard.edu> on behalf of Douglas N Greve 
<gr...@nmr.mgh.harvard.edu>
Sent: Friday, May 26, 2017 12:50:07 PM
To: freesurfer@nmr.mgh.harvard.edu
Subject: Re: [Freesurfer] Contrast matrix format {Disarmed}

It does not matter whether you used the maxvox or the mean of the
cluster. The two p-values are measuring fundamentally different
phenomena. The cluster pvalue is measuring the likelihood of seeing a
cluster of that size by chance. The p-value you have computed is the
likelihood of seeing a mean value in the cluster greater than 0.


On 05/26/2017 12:43 PM, Hilton, Benjamin Taylor wrote:
>
> I was trying to follow along with the suggestion you provided someone
> else here:
> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.mail-archive.com%2Ffreesurfer%40nmr.mgh.harvard.edu%2Fmsg32951.html=01%7C01%7CBTH22%40pitt.edu%7C162aa8b59e2d486a45eb08d4a4574e88%7C9ef9f489e0a04eeb87cc3a526112fd0d%7C1=UCKGxK2ewtC%2FzM%2BAbSKS2Ths5fJkGft1SxDX1ezEwQg%3D=0
>
>
> I'm not sure how relevant that solution is to my problem though, and
> I'm pulling values from the "cache.th40.neg.y.ocn.dat" file which is
> output by the mri_glmfit-sim method.  I believe this has the mean
> cluster value for each subject and each cluster.  I am comparing the
> p-values to the cluster wise p-values.
>
> 
> *From:* freesurfer-boun...@nmr.mgh.harvard.edu
> <freesurfer-boun...@nmr.mgh.harvard.edu> on behalf of Douglas N Greve
> <gr...@nmr.mgh.harvard.edu>
> *Sent:* Thursday, May 25, 2017 6:06:30 PM
> *To:* freesurfer@nmr.mgh.harvard.edu
> *Subject:* Re: [Freesurfer] Contrast matrix format {Disarmed}
> Not sure what you did. Sound like you found the max vox from the
> cluster, then extracted the values from each subject and ran those
> values through the glm to compare p-values against those in the summary
> file. Right? Now, which values from the summary file are you comparing
> against? The cluster-wise p-value is the p-value of the cluster, not of
> a voxel in the cluster. The cluster p-values is the chance that you see
> a cluster of that size by chance.
>
>
> On 05/25/2017 03:06 PM, Hilton, Benjamin Taylor wrote:
> >
> > Running that code it turns up these values:
> >
> >
> > pvalues =
> >
> >1.0e-04 *
> >
> > 0.20840.1849
> >
> > While the p-values are 0.1340 and 0.02200 respectively in the summary
> > file, why the difference?
> > --------
> > *From:* Hilton, Benjamin Taylor
> > *Sent:* Thursday, May 25, 2017 2:43:35 PM
> > *To:* freesurfer@nmr.mgh.harvard.edu
> > *Subject:* Re: [Freesurfer] Contrast matrix format
> >
> > After some digging I found this thread where someone was having a
> > similar issue, so I can give this matlab code you posted a try.
> >
> >
> >
> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.mail-archive.com%2Ffreesurfer%40nmr.mgh.harvard.edu%2Fmsg32951.html=01%7C01%7CBTH22%40pitt.edu%7C1ff1026c69bb4920a63108d4a3ba5aea%7C9ef9f489e0a04eeb87cc3a526112fd0d%7C1=XWWDmJEGLqPk68a1730xVmNBLROYJNCnQGeSxtlNm1s%3D=0
> >
> > ----
> > *From:* freesurfer-boun...@nmr.mgh.harvard.edu
> > <freesurfer-boun...@nmr.mgh.harvard.edu> on behalf of Douglas Greve
> > <gr...@nmr.mgh.harvard.edu>
> > *Sent:* Wednesday, May 24, 2017 10:47:24 AM
> > *To:* freesurfer@nmr.mgh.harvard.edu
> > *Subject:* Re: [Freesurfer] Contrast matrix format
> >
> > yes, that is correct
> >
> >
> > On 5/24/17 10:38 AM, Taylor Hilton wrote:
> >> Hi all,
> >>
> >> I’m trying to perform a group analysis according to the tutorial on
> >> this page: *MailScanner has detected a possible fraud attempt from
> >> "na01.safelinks.protection.outlook.com" claiming to be*
> >>
> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsurfer.nmr.mgh.harvard.edu%2Ffswiki%2FFsTutorial%2FGroupAnalysis=01%7C01%7CBTH22%40pitt.edu%7C1ff1026c69bb4920a63108d4a3ba5aea%7C9ef9f489e0a04eeb87cc3a526112fd0d%7C1=0TekDrngIQuxBzm7%2BfH%2Bl0duFB7dzd1zHsqb9ESgNpM%3D=0
>
> >>
> <https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsurfer.nmr.mgh.harvard.edu%2Ffswiki%2FFsTuto

Re: [Freesurfer] Contrast matrix format {Disarmed}

2017-05-26 Thread Douglas N Greve
It does not matter whether you used the maxvox or the mean of the 
cluster. The two p-values are measuring fundamentally different 
phenomena. The cluster pvalue is measuring the likelihood of seeing a 
cluster of that size by chance. The p-value you have computed is the 
likelihood of seeing a mean value in the cluster greater than 0.


On 05/26/2017 12:43 PM, Hilton, Benjamin Taylor wrote:
>
> I was trying to follow along with the suggestion you provided someone 
> else here: 
> http://www.mail-archive.com/freesurfer@nmr.mgh.harvard.edu/msg32951.html
>
>
> I'm not sure how relevant that solution is to my problem though, and 
> I'm pulling values from the "cache.th40.neg.y.ocn.dat" file which is 
> output by the mri_glmfit-sim method.  I believe this has the mean 
> cluster value for each subject and each cluster.  I am comparing the 
> p-values to the cluster wise p-values.
>
> 
> *From:* freesurfer-boun...@nmr.mgh.harvard.edu 
> <freesurfer-boun...@nmr.mgh.harvard.edu> on behalf of Douglas N Greve 
> <gr...@nmr.mgh.harvard.edu>
> *Sent:* Thursday, May 25, 2017 6:06:30 PM
> *To:* freesurfer@nmr.mgh.harvard.edu
> *Subject:* Re: [Freesurfer] Contrast matrix format {Disarmed}
> Not sure what you did. Sound like you found the max vox from the
> cluster, then extracted the values from each subject and ran those
> values through the glm to compare p-values against those in the summary
> file. Right? Now, which values from the summary file are you comparing
> against? The cluster-wise p-value is the p-value of the cluster, not of
> a voxel in the cluster. The cluster p-values is the chance that you see
> a cluster of that size by chance.
>
>
> On 05/25/2017 03:06 PM, Hilton, Benjamin Taylor wrote:
> >
> > Running that code it turns up these values:
> >
> >
> > pvalues =
> >
> >1.0e-04 *
> >
> > 0.20840.1849
> >
> > While the p-values are 0.1340 and 0.02200 respectively in the summary
> > file, why the difference?
> > --------
> > *From:* Hilton, Benjamin Taylor
> > *Sent:* Thursday, May 25, 2017 2:43:35 PM
> > *To:* freesurfer@nmr.mgh.harvard.edu
> > *Subject:* Re: [Freesurfer] Contrast matrix format
> >
> > After some digging I found this thread where someone was having a
> > similar issue, so I can give this matlab code you posted a try.
> >
> >
> > 
> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.mail-archive.com%2Ffreesurfer%40nmr.mgh.harvard.edu%2Fmsg32951.html=01%7C01%7CBTH22%40pitt.edu%7C1ff1026c69bb4920a63108d4a3ba5aea%7C9ef9f489e0a04eeb87cc3a526112fd0d%7C1=XWWDmJEGLqPk68a1730xVmNBLROYJNCnQGeSxtlNm1s%3D=0
> >
> > 
> > *From:* freesurfer-boun...@nmr.mgh.harvard.edu
> > <freesurfer-boun...@nmr.mgh.harvard.edu> on behalf of Douglas Greve
> > <gr...@nmr.mgh.harvard.edu>
> > *Sent:* Wednesday, May 24, 2017 10:47:24 AM
> > *To:* freesurfer@nmr.mgh.harvard.edu
> > *Subject:* Re: [Freesurfer] Contrast matrix format
> >
> > yes, that is correct
> >
> >
> > On 5/24/17 10:38 AM, Taylor Hilton wrote:
> >> Hi all,
> >>
> >> I’m trying to perform a group analysis according to the tutorial on
> >> this page: *MailScanner has detected a possible fraud attempt from
> >> "na01.safelinks.protection.outlook.com" claiming to be*
> >> 
> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsurfer.nmr.mgh.harvard.edu%2Ffswiki%2FFsTutorial%2FGroupAnalysis=01%7C01%7CBTH22%40pitt.edu%7C1ff1026c69bb4920a63108d4a3ba5aea%7C9ef9f489e0a04eeb87cc3a526112fd0d%7C1=0TekDrngIQuxBzm7%2BfH%2Bl0duFB7dzd1zHsqb9ESgNpM%3D=0
>  
>
> >> 
> <https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsurfer.nmr.mgh.harvard.edu%2Ffswiki%2FFsTutorial%2FGroupAnalysis=01%7C01%7CBTH22%40pitt.edu%7Ce59dd79b995c400da33c08d4a2b3d3bb%7C9ef9f489e0a04eeb87cc3a526112fd0d%7C1=F%2BYoNdQhEqF0iWAtpPJ8rbx6sRcEcJQgLwTm7wGUEa0%3D=0>
> >>
> >> For my own analysis, I have 4 total groups, and I’m trying to do a
> >> contrast between two of those groups.
> >>
> >> My matrix file is formatted ‘0 1 -1 0’, since I’m trying to contrast
> >> the 2nd and 3rd groups.
> >>
> >> My fsgd file is formatted as the following:
> >> GroupDescriptorFile 1
> >> Title PYSCan
> >> Class 1
> >> Class 2
> >> Class 3
> >> Class 4
> >> Input s70032 2
> >> Input s70038 1
&g

Re: [Freesurfer] Contrast matrix format {Disarmed}

2017-05-26 Thread Hilton, Benjamin Taylor
I was trying to follow along with the suggestion you provided someone else 
here: http://www.mail-archive.com/freesurfer@nmr.mgh.harvard.edu/msg32951.html


I'm not sure how relevant that solution is to my problem though, and I'm 
pulling values from the "cache.th40.neg.y.ocn.dat" file which is output by the 
mri_glmfit-sim method.  I believe this has the mean cluster value for each 
subject and each cluster.  I am comparing the p-values to the cluster wise 
p-values.


From: freesurfer-boun...@nmr.mgh.harvard.edu 
<freesurfer-boun...@nmr.mgh.harvard.edu> on behalf of Douglas N Greve 
<gr...@nmr.mgh.harvard.edu>
Sent: Thursday, May 25, 2017 6:06:30 PM
To: freesurfer@nmr.mgh.harvard.edu
Subject: Re: [Freesurfer] Contrast matrix format {Disarmed}

Not sure what you did. Sound like you found the max vox from the
cluster, then extracted the values from each subject and ran those
values through the glm to compare p-values against those in the summary
file. Right? Now, which values from the summary file are you comparing
against? The cluster-wise p-value is the p-value of the cluster, not of
a voxel in the cluster. The cluster p-values is the chance that you see
a cluster of that size by chance.


On 05/25/2017 03:06 PM, Hilton, Benjamin Taylor wrote:
>
> Running that code it turns up these values:
>
>
> pvalues =
>
>1.0e-04 *
>
> 0.20840.1849
>
> While the p-values are 0.1340 and 0.02200 respectively in the summary
> file, why the difference?
> 
> *From:* Hilton, Benjamin Taylor
> *Sent:* Thursday, May 25, 2017 2:43:35 PM
> *To:* freesurfer@nmr.mgh.harvard.edu
> *Subject:* Re: [Freesurfer] Contrast matrix format
>
> After some digging I found this thread where someone was having a
> similar issue, so I can give this matlab code you posted a try.
>
>
> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.mail-archive.com%2Ffreesurfer%40nmr.mgh.harvard.edu%2Fmsg32951.html=01%7C01%7CBTH22%40pitt.edu%7C1ff1026c69bb4920a63108d4a3ba5aea%7C9ef9f489e0a04eeb87cc3a526112fd0d%7C1=XWWDmJEGLqPk68a1730xVmNBLROYJNCnQGeSxtlNm1s%3D=0
>
> 
> *From:* freesurfer-boun...@nmr.mgh.harvard.edu
> <freesurfer-boun...@nmr.mgh.harvard.edu> on behalf of Douglas Greve
> <gr...@nmr.mgh.harvard.edu>
> *Sent:* Wednesday, May 24, 2017 10:47:24 AM
> *To:* freesurfer@nmr.mgh.harvard.edu
> *Subject:* Re: [Freesurfer] Contrast matrix format
>
> yes, that is correct
>
>
> On 5/24/17 10:38 AM, Taylor Hilton wrote:
>> Hi all,
>>
>> I’m trying to perform a group analysis according to the tutorial on
>> this page: *MailScanner has detected a possible fraud attempt from
>> "na01.safelinks.protection.outlook.com" claiming to be*
>> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsurfer.nmr.mgh.harvard.edu%2Ffswiki%2FFsTutorial%2FGroupAnalysis=01%7C01%7CBTH22%40pitt.edu%7C1ff1026c69bb4920a63108d4a3ba5aea%7C9ef9f489e0a04eeb87cc3a526112fd0d%7C1=0TekDrngIQuxBzm7%2BfH%2Bl0duFB7dzd1zHsqb9ESgNpM%3D=0
>> <https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsurfer.nmr.mgh.harvard.edu%2Ffswiki%2FFsTutorial%2FGroupAnalysis=01%7C01%7CBTH22%40pitt.edu%7Ce59dd79b995c400da33c08d4a2b3d3bb%7C9ef9f489e0a04eeb87cc3a526112fd0d%7C1=F%2BYoNdQhEqF0iWAtpPJ8rbx6sRcEcJQgLwTm7wGUEa0%3D=0>
>>
>> For my own analysis, I have 4 total groups, and I’m trying to do a
>> contrast between two of those groups.
>>
>> My matrix file is formatted ‘0 1 -1 0’, since I’m trying to contrast
>> the 2nd and 3rd groups.
>>
>> My fsgd file is formatted as the following:
>> GroupDescriptorFile 1
>> Title PYSCan
>> Class 1
>> Class 2
>> Class 3
>> Class 4
>> Input s70032 2
>> Input s70038 1
>> …
>>
>> Wanted to verify that this is correct since there doesn’t appear to
>> be a group difference when comparing the clusters against the rest of
>> the data.
>>
>> Any help is very appreciated!
>>
>> Sincerely,
>> B. Taylor Hilton
>> Lab Data Coordinator
>> University of Pittsburgh
>>
>>
>> ___
>> Freesurfer mailing list
>> Freesurfer@nmr.mgh.harvard.edu
>> *MailScanner has detected a possible fraud attempt from
>> "na01.safelinks.protection.outlook.com" claiming to be*
>> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Ffreesurfer=01%7C01%7CBTH22%40pitt.edu%7C1ff1026c69bb4920a63108d4a3ba5aea%7C9ef9f489e0a04eeb87cc3a526112fd0d%7C1=hAPzusEDuX5MjF2yn

Re: [Freesurfer] Contrast matrix format {Disarmed}

2017-05-25 Thread Douglas N Greve
Not sure what you did. Sound like you found the max vox from the 
cluster, then extracted the values from each subject and ran those 
values through the glm to compare p-values against those in the summary 
file. Right? Now, which values from the summary file are you comparing 
against? The cluster-wise p-value is the p-value of the cluster, not of 
a voxel in the cluster. The cluster p-values is the chance that you see 
a cluster of that size by chance.


On 05/25/2017 03:06 PM, Hilton, Benjamin Taylor wrote:
>
> Running that code it turns up these values:
>
>
> pvalues =
>
>1.0e-04 *
>
> 0.20840.1849
>
> While the p-values are 0.1340 and 0.02200 respectively in the summary 
> file, why the difference?
> 
> *From:* Hilton, Benjamin Taylor
> *Sent:* Thursday, May 25, 2017 2:43:35 PM
> *To:* freesurfer@nmr.mgh.harvard.edu
> *Subject:* Re: [Freesurfer] Contrast matrix format
>
> After some digging I found this thread where someone was having a 
> similar issue, so I can give this matlab code you posted a try.
>
>
> http://www.mail-archive.com/freesurfer@nmr.mgh.harvard.edu/msg32951.html
>
> 
> *From:* freesurfer-boun...@nmr.mgh.harvard.edu 
> <freesurfer-boun...@nmr.mgh.harvard.edu> on behalf of Douglas Greve 
> <gr...@nmr.mgh.harvard.edu>
> *Sent:* Wednesday, May 24, 2017 10:47:24 AM
> *To:* freesurfer@nmr.mgh.harvard.edu
> *Subject:* Re: [Freesurfer] Contrast matrix format
>
> yes, that is correct
>
>
> On 5/24/17 10:38 AM, Taylor Hilton wrote:
>> Hi all,
>>
>> I’m trying to perform a group analysis according to the tutorial on 
>> this page: *MailScanner has detected a possible fraud attempt from 
>> "na01.safelinks.protection.outlook.com" claiming to be* 
>> https://surfer.nmr.mgh.harvard.edu/fswiki/FsTutorial/GroupAnalysis 
>> <https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsurfer.nmr.mgh.harvard.edu%2Ffswiki%2FFsTutorial%2FGroupAnalysis=01%7C01%7CBTH22%40pitt.edu%7Ce59dd79b995c400da33c08d4a2b3d3bb%7C9ef9f489e0a04eeb87cc3a526112fd0d%7C1=F%2BYoNdQhEqF0iWAtpPJ8rbx6sRcEcJQgLwTm7wGUEa0%3D=0>
>>
>> For my own analysis, I have 4 total groups, and I’m trying to do a 
>> contrast between two of those groups.
>>
>> My matrix file is formatted ‘0 1 -1 0’, since I’m trying to contrast 
>> the 2nd and 3rd groups.
>>
>> My fsgd file is formatted as the following:
>> GroupDescriptorFile 1
>> Title PYSCan
>> Class 1
>> Class 2
>> Class 3
>> Class 4
>> Input s70032 2
>> Input s70038 1
>> …
>>
>> Wanted to verify that this is correct since there doesn’t appear to 
>> be a group difference when comparing the clusters against the rest of 
>> the data.
>>
>> Any help is very appreciated!
>>
>> Sincerely,
>> B. Taylor Hilton
>> Lab Data Coordinator
>> University of Pittsburgh
>>
>>
>> ___
>> Freesurfer mailing list
>> Freesurfer@nmr.mgh.harvard.edu
>> *MailScanner has detected a possible fraud attempt from 
>> "na01.safelinks.protection.outlook.com" claiming to be* 
>> 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

-- 
Douglas N. Greve, Ph.D.
MGH-NMR Center
gr...@nmr.mgh.harvard.edu
Phone Number: 617-724-2358
Fax: 617-726-7422

Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
FileDrop: https://gate.nmr.mgh.harvard.edu/filedrop2
www.nmr.mgh.harvard.edu/facility/filedrop/index.html
Outgoing: ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/

___
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.



Re: [Freesurfer] Contrast matrix format {Disarmed}

2017-05-25 Thread Hilton, Benjamin Taylor
Running that code it turns up these values:


pvalues =

   1.0e-04 *

0.20840.1849

While the p-values are 0.1340 and 0.02200 respectively in the summary file, why 
the difference?


From: Hilton, Benjamin Taylor
Sent: Thursday, May 25, 2017 2:43:35 PM
To: freesurfer@nmr.mgh.harvard.edu
Subject: Re: [Freesurfer] Contrast matrix format


After some digging I found this thread where someone was having a similar 
issue, so I can give this matlab code you posted a try.


http://www.mail-archive.com/freesurfer@nmr.mgh.harvard.edu/msg32951.html


From: freesurfer-boun...@nmr.mgh.harvard.edu 
<freesurfer-boun...@nmr.mgh.harvard.edu> on behalf of Douglas Greve 
<gr...@nmr.mgh.harvard.edu>
Sent: Wednesday, May 24, 2017 10:47:24 AM
To: freesurfer@nmr.mgh.harvard.edu
Subject: Re: [Freesurfer] Contrast matrix format


yes, that is correct

On 5/24/17 10:38 AM, Taylor Hilton wrote:
Hi all,

I’m trying to perform a group analysis according to the tutorial on this page: 
https://surfer.nmr.mgh.harvard.edu/fswiki/FsTutorial/GroupAnalysis<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsurfer.nmr.mgh.harvard.edu%2Ffswiki%2FFsTutorial%2FGroupAnalysis=01%7C01%7CBTH22%40pitt.edu%7Ce59dd79b995c400da33c08d4a2b3d3bb%7C9ef9f489e0a04eeb87cc3a526112fd0d%7C1=F%2BYoNdQhEqF0iWAtpPJ8rbx6sRcEcJQgLwTm7wGUEa0%3D=0>

For my own analysis, I have 4 total groups, and I’m trying to do a contrast 
between two of those groups.

My matrix file is formatted ‘0 1 -1 0’, since I’m trying to contrast the 2nd 
and 3rd groups.

My fsgd file is formatted as the following:
GroupDescriptorFile 1
Title PYSCan
Class 1
Class 2
Class 3
Class 4
Input s70032 2
Input s70038 1
…

Wanted to verify that this is correct since there doesn’t appear to be a group 
difference when comparing the clusters against the rest of the data.

Any help is very appreciated!

Sincerely,
B. Taylor Hilton
Lab Data Coordinator
University of Pittsburgh



___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu<mailto:Freesurfer@nmr.mgh.harvard.edu>
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Ffreesurfer=01%7C01%7CBTH22%40pitt.edu%7Ce59dd79b995c400da33c08d4a2b3d3bb%7C9ef9f489e0a04eeb87cc3a526112fd0d%7C1=TlpipUOHlI9wBEcBdMHORvLFpGzlav4t4ulwWjmXFDY%3D=0>

___
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.


Re: [Freesurfer] Contrast matrix format {Disarmed}

2017-05-25 Thread Hilton, Benjamin Taylor
After some digging I found this thread where someone was having a similar 
issue, so I can give this matlab code you posted a try.


http://www.mail-archive.com/freesurfer@nmr.mgh.harvard.edu/msg32951.html


From: freesurfer-boun...@nmr.mgh.harvard.edu 
<freesurfer-boun...@nmr.mgh.harvard.edu> on behalf of Douglas Greve 
<gr...@nmr.mgh.harvard.edu>
Sent: Wednesday, May 24, 2017 10:47:24 AM
To: freesurfer@nmr.mgh.harvard.edu
Subject: Re: [Freesurfer] Contrast matrix format


yes, that is correct

On 5/24/17 10:38 AM, Taylor Hilton wrote:
Hi all,

I’m trying to perform a group analysis according to the tutorial on this page: 
https://surfer.nmr.mgh.harvard.edu/fswiki/FsTutorial/GroupAnalysis<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsurfer.nmr.mgh.harvard.edu%2Ffswiki%2FFsTutorial%2FGroupAnalysis=01%7C01%7CBTH22%40pitt.edu%7Ce59dd79b995c400da33c08d4a2b3d3bb%7C9ef9f489e0a04eeb87cc3a526112fd0d%7C1=F%2BYoNdQhEqF0iWAtpPJ8rbx6sRcEcJQgLwTm7wGUEa0%3D=0>

For my own analysis, I have 4 total groups, and I’m trying to do a contrast 
between two of those groups.

My matrix file is formatted ‘0 1 -1 0’, since I’m trying to contrast the 2nd 
and 3rd groups.

My fsgd file is formatted as the following:
GroupDescriptorFile 1
Title PYSCan
Class 1
Class 2
Class 3
Class 4
Input s70032 2
Input s70038 1
…

Wanted to verify that this is correct since there doesn’t appear to be a group 
difference when comparing the clusters against the rest of the data.

Any help is very appreciated!

Sincerely,
B. Taylor Hilton
Lab Data Coordinator
University of Pittsburgh



___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu<mailto:Freesurfer@nmr.mgh.harvard.edu>
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Ffreesurfer=01%7C01%7CBTH22%40pitt.edu%7Ce59dd79b995c400da33c08d4a2b3d3bb%7C9ef9f489e0a04eeb87cc3a526112fd0d%7C1=TlpipUOHlI9wBEcBdMHORvLFpGzlav4t4ulwWjmXFDY%3D=0>

___
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.


Re: [Freesurfer] Contrast matrix format {Disarmed}

2017-05-25 Thread Hilton, Benjamin Taylor
Okay then we’re having an issue somewhere along the line.  Using the 
cache.th40.neg.y.ocn.dat file to make a csv file, we pulled out the individual 
values and compared across groups using a linear regression in R and didn’t 
find a group difference for each cluster.  Any thoughts as to why that might 
be?  This is assuming of course that the file goes top to bottom in ascending 
order, and that the columns are each cluster from left to right.

- Taylor


From: freesurfer-boun...@nmr.mgh.harvard.edu 
<freesurfer-boun...@nmr.mgh.harvard.edu> on behalf of Douglas Greve 
<gr...@nmr.mgh.harvard.edu>
Sent: Wednesday, May 24, 2017 10:47:24 AM
To: freesurfer@nmr.mgh.harvard.edu
Subject: Re: [Freesurfer] Contrast matrix format


yes, that is correct

On 5/24/17 10:38 AM, Taylor Hilton wrote:
Hi all,

I’m trying to perform a group analysis according to the tutorial on this page: 
https://surfer.nmr.mgh.harvard.edu/fswiki/FsTutorial/GroupAnalysis<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsurfer.nmr.mgh.harvard.edu%2Ffswiki%2FFsTutorial%2FGroupAnalysis=01%7C01%7CBTH22%40pitt.edu%7Ce59dd79b995c400da33c08d4a2b3d3bb%7C9ef9f489e0a04eeb87cc3a526112fd0d%7C1=F%2BYoNdQhEqF0iWAtpPJ8rbx6sRcEcJQgLwTm7wGUEa0%3D=0>

For my own analysis, I have 4 total groups, and I’m trying to do a contrast 
between two of those groups.

My matrix file is formatted ‘0 1 -1 0’, since I’m trying to contrast the 2nd 
and 3rd groups.

My fsgd file is formatted as the following:
GroupDescriptorFile 1
Title PYSCan
Class 1
Class 2
Class 3
Class 4
Input s70032 2
Input s70038 1
…

Wanted to verify that this is correct since there doesn’t appear to be a group 
difference when comparing the clusters against the rest of the data.

Any help is very appreciated!

Sincerely,
B. Taylor Hilton
Lab Data Coordinator
University of Pittsburgh



___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu<mailto:Freesurfer@nmr.mgh.harvard.edu>
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Ffreesurfer=01%7C01%7CBTH22%40pitt.edu%7Ce59dd79b995c400da33c08d4a2b3d3bb%7C9ef9f489e0a04eeb87cc3a526112fd0d%7C1=TlpipUOHlI9wBEcBdMHORvLFpGzlav4t4ulwWjmXFDY%3D=0>

___
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.


Re: [Freesurfer] Contrast matrix format

2017-05-24 Thread Douglas Greve

yes, that is correct


On 5/24/17 10:38 AM, Taylor Hilton wrote:

Hi all,

I’m trying to perform a group analysis according to the tutorial on 
this page: 
https://surfer.nmr.mgh.harvard.edu/fswiki/FsTutorial/GroupAnalysis


For my own analysis, I have 4 total groups, and I’m trying to do a 
contrast between two of those groups.


My matrix file is formatted ‘0 1 -1 0’, since I’m trying to contrast 
the 2nd and 3rd groups.


My fsgd file is formatted as the following:
GroupDescriptorFile 1
Title PYSCan
Class 1
Class 2
Class 3
Class 4
Input s70032 2
Input s70038 1
…

Wanted to verify that this is correct since there doesn’t appear to be 
a group difference when comparing the clusters against the rest of the 
data.


Any help is very appreciated!

Sincerely,
B. Taylor Hilton
Lab Data Coordinator
University of Pittsburgh


___
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] Contrast matrix format

2017-05-24 Thread Taylor Hilton
Hi all,

I’m trying to perform a group analysis according to the tutorial on this page: 
https://surfer.nmr.mgh.harvard.edu/fswiki/FsTutorial/GroupAnalysis 


For my own analysis, I have 4 total groups, and I’m trying to do a contrast 
between two of those groups.  

My matrix file is formatted ‘0 1 -1 0’, since I’m trying to contrast the 2nd 
and 3rd groups.  

My fsgd file is formatted as the following:
GroupDescriptorFile 1
Title PYSCan
Class 1
Class 2
Class 3
Class 4
Input s70032 2
Input s70038 1
…

Wanted to verify that this is correct since there doesn’t appear to be a group 
difference when comparing the clusters against the rest of the data.

Any help is very appreciated!

Sincerely,
B. Taylor Hilton
Lab Data Coordinator
University of Pittsburgh___
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.


Re: [Freesurfer] Contrast matrix regressing out effect of diagnosis and age

2017-05-22 Thread Douglas N Greve
yes


On 05/19/2017 03:02 AM, Erik Lindberg wrote:
> Dear Freesurfer experts,
>
> I am running a GLM-model in which I have 6 classes (diagnosis) and two 
> covariates age and variable X).
>
> I want to look at mean correlation of variable X.
>
> My contrast matrix is as follows: 0 0 0 0 0 0 0 0 0 0 0 0 0.17 0.17 
> 0.17 0.17 0.17 0.17
>
> 0.17 (approx. 1/6)
>
> Did I get this right?
>
> Thanks
> Eric
>
>
> ___
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

-- 
Douglas N. Greve, Ph.D.
MGH-NMR Center
gr...@nmr.mgh.harvard.edu
Phone Number: 617-724-2358
Fax: 617-726-7422

Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
FileDrop: https://gate.nmr.mgh.harvard.edu/filedrop2
www.nmr.mgh.harvard.edu/facility/filedrop/index.html
Outgoing: ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/

___
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] Contrast matrix regressing out effect of diagnosis and age

2017-05-19 Thread Erik Lindberg
Dear Freesurfer experts,

I am running a GLM-model in which I have 6 classes (diagnosis) and two
covariates age and variable X).

I want to look at mean correlation of variable X.

My contrast matrix is as follows: 0 0 0 0 0 0 0 0 0 0 0 0 0.17 0.17 0.17
0.17 0.17 0.17

0.17 (approx. 1/6)

Did I get this right?

Thanks
Eric
___
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.


Re: [Freesurfer] Contrast matrix for PVR

2017-05-16 Thread Douglas Greve

The 2nd is the correct matrix


On 5/15/17 12:36 PM, Sahil Bajaj wrote:


Hi everyone,

From FreeSurfer manual and discussion forum, I found that volume and 
LGI can be correlated using mri_glmfit command with -pvr flag.


For that, my fsgd file has age, gender as covariates and the file is 
as following:


GroupDescriptorFile 1

Class Male

Class Female

Variables Age

Inputzerek1 Male 21

Input zerek2 Male 25

etc.

My concern is:

To run mri_glmfit command, I am not sure how to define my contrast 
matrixif I am interested in removing the effect of age and sex.


1st option I tried is: 0 0.5 0.5 0 1

Here, I think first 0 regresses out age, 0.5 0.5 should be averaging 
over males and females and last 0 1 correlates between volume and LGI. 
But this looks like it is not giving me correct correlations maps, 
although there is no error.


2nd option I tried is: 0 0 0 0 1

This looks like its working and maps look correct to me but I want to 
make sure this is the correct contrast matrix and I am not sure how 
this matrix is regressing out age and gender or 1st option is correct 
contrast matrix?


Thank you so much !

Best,

Sahil



___
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] Contrast matrix for PVR

2017-05-15 Thread Sahil Bajaj
Hi everyone,

>From FreeSurfer manual and discussion forum, I found that volume and LGI
can be correlated using mri_glmfit command with -pvr flag.

For that, my fsgd file has age, gender as covariates and the file is as
following:

GroupDescriptorFile 1

Class Male

Class Female

Variables Age

Inputzerek1 Male 21

Input zerek2 Male 25

etc.

My concern is:

To run mri_glmfit command, I am not sure how to define my contrast matrix
if I am interested in removing the effect of age and sex.

1st option I tried is: 0 0.5 0.5 0 1

Here, I think first 0 regresses out age, 0.5 0.5 should be averaging over
males and females and last 0 1 correlates between volume and LGI. But this
looks like it is not giving me correct correlations maps, although there is
no error.

2nd option I tried is: 0 0 0 0 1

This looks like its working and maps look correct to me but I want to make
sure this is the correct contrast matrix and I am not sure how this matrix
is regressing out age and gender or 1st option is correct contrast matrix?

Thank you so much !

Best,

Sahil
___
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.


Re: [Freesurfer] contrast matrix for one-way ANOVA with 1 factor, 4 groups

2017-02-21 Thread Gold, Andrea (NIH/NIMH) [F]
Thanks so much, Doug! I got the same results for both of these contrast 
matrices, so my original question is all set.

However, I was surprised when I ran mri_glmfit-sim that there were 47 clusters 
for the LH, some as small as 2.51mm^2 (and the max 382.23mm^3, which is way 
smaller than what I found in qdec with the 2 group analysis of these data). So, 
I’m thinking this can’t be correct (particularly with 1.3 threshold).

I followed the steps here 
https://surfer.nmr.mgh.harvard.edu/fswiki/FsTutorial/GroupAnalysis and copied 
my commands below.

1. mris_preproc
mris_preproc --fsgd dx4subgroups_n146.fsgd --cache-in 
thickness.fwhm10.fsaverage --target fsaverage --hemi lh --out 
dx4subgroups_n146-lh-thickness.mgh


2. mri_glmfit
mri_glmfit --y dx4subgroups_n146-lh-thickness.mgh --fsgd dx4subgroups_n146.fsgd 
dods --C group.effect.mtx --surf fsaverage lh --glmdir 
dx4subgroups_n146-lh-thickness_Fmatrix.glmdir

3. mri_glmfit-sim
mri_glmfit-sim --glmdir dx4subgroups_n146-lh-thickness_Fmatrix.glmdir --cache 
1.3 abs --cwp  0.05 --2spaces

Do you see any issues?

Thank you so much for your help!

Best,
Andrea



Re: [Freesurfer] contrast matrix for one-way ANOVA with 1 factor, 4 
groups<http://www.mail-archive.com/search?l=freesurfer@nmr.mgh.harvard.edu=subject:%22Re%5C%3A+%5C%5BFreesurfer%5C%5D+contrast+matrix+for+one%5C-way+ANOVA+with+1+factor%2C+4+groups%22=newest>
Douglas N 
Greve<http://www.mail-archive.com/search?l=freesurfer@nmr.mgh.harvard.edu=from:%22Douglas+N+Greve%22>
 Tue, 21 Feb 2017 12:53:08 
-0800<http://www.mail-archive.com/search?l=freesurfer@nmr.mgh.harvard.edu=date:20170221>
That four group test will yield the same exact result as

1 -1 0 0

1 0 -1 0

1 0 0 -1

so I think you are ok



From: "Gold, Andrea (NIH/NIMH) [F]" <andrea.g...@nih.gov>
Date: Tuesday, February 21, 2017 at 3:09 PM
To: "freesurfer@nmr.mgh.harvard.edu" <freesurfer@nmr.mgh.harvard.edu>
Subject: contrast matrix for one-way ANOVA with 1 factor, 4 groups

Hi,

I am trying to run a cortical thickness analysis comparing four groups – my 
goal is to conduct an omnibus F-test testing for any group differences. I have 
0 covariates/nuisance regressors.

This would be equivalent to the “Contrast 4 group.effect.mtx” in this page, for 
3 groups: https://surfer.nmr.mgh.harvard.edu/fswiki/Fsgdf3G0V

But, instead of 3 groups I have 4 groups.

I thought the contrast matrix for 4 groups F-test would be:
1 -1 0 0
0 1 -1 0
0 0 1 -1

But for 3 groups it is:
1 -1 0
1 0 -1


Would you please clarify the correct contrast matrix for this test in 
Freesurfer mri_glmfit?

Thank you!
Andrea

--
Andrea Gold, Ph.D.
Section on Development and Affective Neuroscience
National Institute of Mental Health
9000 Rockville Pike MSC 2670
Bldg. 15K
Bethesda, MD 20892
Phone: 301-402-6955
Fax: 301-402-2010
Email: andrea.g...@nih.gov


___
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.


Re: [Freesurfer] contrast matrix for one-way ANOVA with 1 factor, 4 groups

2017-02-21 Thread Douglas N Greve
That four group test will yield the same exact result as

1 -1 0 0

1 0 -1 0

1 0 0 -1

so I think you are ok


On 02/21/2017 03:09 PM, Gold, Andrea (NIH/NIMH) [F] wrote:
>
> Hi,
>
> I am trying to run a cortical thickness analysis comparing four groups 
> – my goal is to conduct an omnibus F-test testing for any group 
> differences. I have 0 covariates/nuisance regressors.
>
> This would be equivalent to the “Contrast 4 group.effect.mtx” in this 
> page, for 3 groups: https://surfer.nmr.mgh.harvard.edu/fswiki/Fsgdf3G0V
>
> But, instead of 3 groups I have 4 groups.
>
> I thought the contrast matrix for 4 groups F-test would be:
>
> 1 -1 0 0
>
> 0 1 -1 0
>
> 0 0 1 -1
>
> But for 3 groups it is:
>
> 1 -1 0
>
> 1 0 -1
>
> Would you please clarify the correct contrast matrix for this test in 
> Freesurfer mri_glmfit?
>
>
> Thank you!
>
> Andrea
>
> -- 
>
> Andrea Gold, Ph.D.
> Section on Development and Affective Neuroscience
>
> National Institute of Mental Health
> 9000 Rockville Pike MSC 2670
> Bldg. 15K
> Bethesda, MD 20892
> Phone: 301-402-6955
> Fax: 301-402-2010
>
> Email: andrea.g...@nih.gov
>
>
>
> ___
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

-- 
Douglas N. Greve, Ph.D.
MGH-NMR Center
gr...@nmr.mgh.harvard.edu
Phone Number: 617-724-2358
Fax: 617-726-7422

Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
FileDrop: https://gate.nmr.mgh.harvard.edu/filedrop2
www.nmr.mgh.harvard.edu/facility/filedrop/index.html
Outgoing: ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/

___
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] contrast matrix for one-way ANOVA with 1 factor, 4 groups

2017-02-21 Thread Gold, Andrea (NIH/NIMH) [F]
Hi,

I am trying to run a cortical thickness analysis comparing four groups – my 
goal is to conduct an omnibus F-test testing for any group differences. I have 
0 covariates/nuisance regressors.

This would be equivalent to the “Contrast 4 group.effect.mtx” in this page, for 
3 groups: https://surfer.nmr.mgh.harvard.edu/fswiki/Fsgdf3G0V

But, instead of 3 groups I have 4 groups.

I thought the contrast matrix for 4 groups F-test would be:
1 -1 0 0
0 1 -1 0
0 0 1 -1

But for 3 groups it is:
1 -1 0
1 0 -1


Would you please clarify the correct contrast matrix for this test in 
Freesurfer mri_glmfit?

Thank you!
Andrea

--
Andrea Gold, Ph.D.
Section on Development and Affective Neuroscience
National Institute of Mental Health
9000 Rockville Pike MSC 2670
Bldg. 15K
Bethesda, MD 20892
Phone: 301-402-6955
Fax: 301-402-2010
Email: andrea.g...@nih.gov


___
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] Contrast matrix for per-vertex regressor

2013-07-04 Thread Elisa Scariati
Dear freesurfers,

I'm currently making a per-vertex analysis using the --pvr flag of
mri_glmfit.

I already made within-group correlations between thickness and lGI
correcting for age and gender that worked perfectly.

However, when I tried to make a between groups comparison, I ran into an
error and I'm wondering if I did it correctly.

I want to compare the slope of the pvr between my groups, so I will use a
DODS design.
In my fsgd file I have the following columns: group, age, gender.
So, counting my pvr, I should have in my contrast matrix 2*(3+1)=8 columns.

I made my contrast this way : 0 0 0 0 0 0 1 -1

However, when running mri_glmfit, I get the following error:

ERROR: dimension mismatch between X and contrast C22qVScon.txt   X has
7 cols, C has 8 cols

As my matrix file has 6 columns corresponding to what would be expected
from my fsgd file (two for group, gender and age, that contain the correct
values), it seems that there is only one column added for the pvr instead
of two.

Do anyone know if I made a mistake or is it not possible to compare pvr
between groups this way?


Thank you in advance for your answer,
Best regards
Elisa
___
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.


Re: [Freesurfer] Contrast matrix for per-vertex regressor

2013-07-04 Thread Douglas Greve

Hi Elisa, can you send the command line and full terminal output?
doug


On 7/4/13 11:50 AM, Elisa Scariati wrote:

Dear freesurfers,

I'm currently making a per-vertex analysis using the --pvr flag of 
mri_glmfit.


I already made within-group correlations between thickness and lGI 
correcting for age and gender that worked perfectly.


However, when I tried to make a between groups comparison, I ran into 
an error and I'm wondering if I did it correctly.


I want to compare the slope of the pvr between my groups, so I will 
use a DODS design.

In my fsgd file I have the following columns: group, age, gender.
So, counting my pvr, I should have in my contrast matrix 2*(3+1)=8 
columns.


I made my contrast this way : 0 0 0 0 0 0 1 -1

However, when running mri_glmfit, I get the following error:

ERROR: dimension mismatch between X and contrast C22qVScon.txt   X 
has 7 cols, C has 8 cols


As my matrix file has 6 columns corresponding to what would be 
expected from my fsgd file (two for group, gender and age, that 
contain the correct values), it seems that there is only one column 
added for the pvr instead of two.


Do anyone know if I made a mistake or is it not possible to compare 
pvr between groups this way?



Thank you in advance for your answer,
Best regards
Elisa




___
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.


Re: [Freesurfer] contrast matrix

2013-03-28 Thread MCLAREN, Donald
On Wed, Mar 27, 2013 at 2:53 AM, xiangbo_2010 xiangbo_2...@126.com wrote:

 Dear Prof Donald McLaren

 I am sorry to disturb you! I have four discrete variables {factor 1(A,B),
 factor 2(C,D), factor 3(G,H), and gender(M,F)} and a continuous variable
 (age), I want to use the GLM to analysis the result of the interaction
 among  factor 1(A,B), factor 2(C,D) and factor 3(E,F)
 regressing out the effect of gender and age, and I have 16 classes:
 MACG,MACH, MADG, MADH, MBCG, MBCH, MBDG, MBDH, FACG,FACH, FADG, FADH,
 FBCG, FBCH, FBDG, FBDH, so I design the contrast is following:
 1 -1 -1 1 -1 1 1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 1 -1 -1 1 -1 1 1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0


IF - and this is a big if -- the columns are as you have described in this
order, then the contrast should be:
1 -1 -1 1 -1 1 1 -1 1 -1 -1 1 -1 1 1 -1

To create any contrast, you need to start with the null hypothesis and then
you can build up the contrast from its smaller elements:
This is for a design with 18 subjects in group 1, 9 subjects in group
2, 2 group terms and 7 conditions: Start with the simpliest element,
single subject in a single condition, build its contrast, repeat for
all subjects and conditions, and then combine the ones you want.

S1G1C1=[1 zeros(1,26) 1 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0]
S1G1C2=[1 zeros(1,26) 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0]

Now average your G1C1 and by summing and dividing by the number of
subjects, you'd get
G1C1=[ones(1,18)/18 zeros(1,9) 1 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0
0]
and
G1C2=[ones(1,18)/18 zeros(1,9) 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0
0]
and
G2C1=[zeros(1,18) ones(1,9)/9 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0]
and
G2C2=[zeros(1,18) ones(1,9)/9 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0]

Now subtract G1C1-G1C2 AND G2C2-G2C1
G1C1-G1C2=[zeros(1,27) 0 0 1 -1 0 0 0 0 0 1 -1 0 0 0 0 0 0 0 0 0 0 0 0]
and
G2C1-G2C2=[zeros(1,27) 0 0 1 -1 0 0 0 0 0 0 0 0 0 0 0 0 1 -1 0 0 0 0 0]

Now subtract these two:
Interaction contrast=[zeros(1,27) 0 0 0 0 0 0 0 0 0 1 -1 0 0 0 0 0 -1
1 0 0 0 0 0]

In your case, if you start with G-H for Males in group A/C:
1 -1 0 0 0 0...

Then Males in group A/D:
0 0 1 -1 0 0

Subtracting these gives you the interaction of factor 2 and 3 for A males.

1 -1 -1 1 0 0 0 0 0...

You can repeat for A females.

0 0 0 0 0 0 0 0 1 -1 -1 1 0 0 0 0

Now you can do the same for B males and B females:
0 0 0 0 1 -1 -1 1 0 0 0 0 0 0 0 0 and 0 0 0 0 0 0 0 0 0 0 0 0 1 -1 -1 1

Now subtract A from B after adding males and females:
1 -1 -1 1 -1 1 1 -1 1 -1 -1 1 -1 1 1 -1

This will work for any contrast that you ever want to make.





 is correct? thank you very much!

 look forward for your reply!


 Bo Xiang






 At 2012-11-21 04:07:37,MCLAREN, Donald mclaren.don...@gmail.com
  wrote:
 On Tue, Nov 20, 2012 at 12:56 PM, Douglas N Greve
 gr...@nmr.mgh.harvard.edu wrote:
  Thanks Donald. Is this the standard way to do this? I had used 8 rows
  instead of 4 with the difference being that 8 rows gives you an opportunity
  to look for an effect in males OR females.
 
 Yes. Having 8 rows would tell you if you have an interaction between
 factor 1 and 2 in either males or females. My 4 rows only tell you if
 the interaction exists. Technically speaking, one would run the
 three-way interaction first. If nothing existed then you do the
 two-way interaction as I suggested. If there is a three-way
 interaction, then you would use Doug's approach of the interaction in
 either males or females.
 
 If there is an effect in both
  males and females but the effects go in opposite directions, then the 4 row
  implementation will resolve to 0 (no effect). Or am I misunderstanding
  something (again:)?
 
 Nope. You are right. If the male and female effects are different,
 then they could cancel each other out. If you suspect this to be the
 case, then you should be able to demonstrate a three-way interaction.
 
  thanks!
  doug
 
 
  On 11/20/2012 01:50 PM, MCLAREN, Donald wrote:
 
  Bo,
 
  Doug asked me to chime in on your issue. Here are some points that you
  (and others) will hopefully find useful.
 
  (1) Inferences are two-step process. First, you create and estimate
  the design matrix. Every column in the design matrix accounts can
  account for some of the variance in the data. Second, you have
  contrasts that allow you to infer specific effects. Because the model
  contains your covariates, you are always controlling for the
  covariates and by extension any factor/covariate not in the contrast.
 
  (2) Forming contrasts is often the most difficult thing to do. I
  assume that your three factors (1, 2, and gender) are all
  between-subject factors. If one of them is a within-subject factor
  please let me know and disregard the rest of the email. The final
  F-contrast will have 4 rows (factor 1 levels-1)*(factor 2 levels
  -1)=(3-1)*(3-1)=2*2=4
 
  The following is an outline for creating 

[Freesurfer] contrast matrix

2013-03-27 Thread xiangbo_2010
Dear Prof Donald McLaren


I am sorry to disturb you! I have four discrete variables {factor 1(A,B), 
factor 2(C,D), factor 3(G,H), and gender(M,F)} and a continuous variable (age), 
I want to use the GLM to analysis the result of the interaction among  factor 
1(A,B), factor 2(C,D) and factor 3(E,F) regressing out the effect of gender and 
age, and I have 16 classes: MACG,MACH, MADG, MADH, MBCG, MBCH, MBDG, MBDH, 
FACG,FACH, FADG, FADH, FBCG, FBCH, FBDG, FBDH, so I design the contrast is 
following:
1 -1 -1 1 -1 1 1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
0 0 0 0 0 0 0 0 1 -1 -1 1 -1 1 1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 


is correct? thank you very much!


look forward for your reply!




Bo Xiang








At 2012-11-21 04:07:37,MCLAREN, Donald mclaren.don...@gmail.com wrote:
On Tue, Nov 20, 2012 at 12:56 PM, Douglas N Greve
gr...@nmr.mgh.harvard.edu wrote:
 Thanks Donald. Is this the standard way to do this? I had used 8 rows
 instead of 4 with the difference being that 8 rows gives you an opportunity
 to look for an effect in males OR females.

Yes. Having 8 rows would tell you if you have an interaction between
factor 1 and 2 in either males or females. My 4 rows only tell you if
the interaction exists. Technically speaking, one would run the
three-way interaction first. If nothing existed then you do the
two-way interaction as I suggested. If there is a three-way
interaction, then you would use Doug's approach of the interaction in
either males or females.

If there is an effect in both
 males and females but the effects go in opposite directions, then the 4 row
 implementation will resolve to 0 (no effect). Or am I misunderstanding
 something (again:)?

Nope. You are right. If the male and female effects are different,
then they could cancel each other out. If you suspect this to be the
case, then you should be able to demonstrate a three-way interaction.

 thanks!
 doug


 On 11/20/2012 01:50 PM, MCLAREN, Donald wrote:

 Bo,

 Doug asked me to chime in on your issue. Here are some points that you
 (and others) will hopefully find useful.

 (1) Inferences are two-step process. First, you create and estimate
 the design matrix. Every column in the design matrix accounts can
 account for some of the variance in the data. Second, you have
 contrasts that allow you to infer specific effects. Because the model
 contains your covariates, you are always controlling for the
 covariates and by extension any factor/covariate not in the contrast.

 (2) Forming contrasts is often the most difficult thing to do. I
 assume that your three factors (1, 2, and gender) are all
 between-subject factors. If one of them is a within-subject factor
 please let me know and disregard the rest of the email. The final
 F-contrast will have 4 rows (factor 1 levels-1)*(factor 2 levels
 -1)=(3-1)*(3-1)=2*2=4

 The following is an outline for creating contrasts:
 (a) Start simple - difference between levels of 1 factor
 (b) Define your null hypothesis: AO=AP=AQ
 (c) Make it equal to 0: AO-AP=0 AND AP-AQ=0
 (d) Repeat for the other levels of the factor...
 BO-BP=0 AND BP-BQ=0
 CO-CP=0 AND CP-CQ=0

 (e) Now combine them AO-AP=BO-BP=CO-CP AND AP-AQ=BP-BQ=CP-CQ

 (f) Make them equal to 0:
 AO-AP-BO+BP=0
 BO-BP-CO+CP=0
 AP-AQ-BP+BQ=0
 BP-BQ-CP+CQ=0

 (g) Expand them to include gender, for example:
 AO-AP-BO+BP=0 becomes FAO-FAP-FBO+FBP+MAO-MAP-MBO+MBP=0

 Since the contrast now has 2 columns per level, you should divide all
 values by 2. This will produce the correct amplitude and statistics.
 If you leave the values as 1 and -1, then you will have an incorrect
 amplitude, but the statistics will still be correct.

 (h) Fill in the respective columns of your design matrix.

 (3) The degrees of freedom are defined based on the rows of the
 F-matrix and the number of rows in the design matrix. The F-test has a
 numerator and denominator degrees of freedom. F(n,d).

 Best Regards, Donald McLaren
 =
 D.G. McLaren, Ph.D.
 Research Fellow, Department of Neurology, Massachusetts General Hospital
 and
 Harvard Medical School
 Postdoctoral Research Fellow, GRECC, Bedford VA
 Website: http://www.martinos.org/~mclaren
 Office: (773) 406-2464
 =
 This e-mail contains CONFIDENTIAL INFORMATION which may contain PROTECTED
 HEALTHCARE INFORMATION and may also be LEGALLY PRIVILEGED and which is
 intended only for the use of the individual or entity named above. If the
 reader of the e-mail is not the intended recipient or the employee or
 agent
 responsible for delivering it to the intended recipient, you are hereby
 notified that you are in possession of confidential and privileged
 information. Any unauthorized use, disclosure, copying or the taking of
 any
 action in reliance on the contents of this information is strictly
 prohibited and may be unlawful. If you have received this e-mail
 unintentionally, please immediately notify the sender via telephone at
 (773)
 406-2464 or email.


 On Tue, Nov 

[Freesurfer] contrast matrix

2013-03-23 Thread xiangbo_2010
Dear Prof Donald McLaren


I am sorry to disturb you! I have four discrete variables {factor 1(A,B), 
factor 2(C,D), factor 3(E,F), and gender(M,F)} and a continuous variable (age), 
I want to use the GLM to analysis the result of the interaction among  factor 
1(A,B), factor 2(C,D) and factor 3(E,F) regressing out the effect of gender and 
age, and how to make the contrast? thank you very much!


look forward your reply!




Bo Xiang








At 2012-11-21 04:07:37,MCLAREN, Donald mclaren.don...@gmail.com wrote:
On Tue, Nov 20, 2012 at 12:56 PM, Douglas N Greve
gr...@nmr.mgh.harvard.edu wrote:
 Thanks Donald. Is this the standard way to do this? I had used 8 rows
 instead of 4 with the difference being that 8 rows gives you an opportunity
 to look for an effect in males OR females.

Yes. Having 8 rows would tell you if you have an interaction between
factor 1 and 2 in either males or females. My 4 rows only tell you if
the interaction exists. Technically speaking, one would run the
three-way interaction first. If nothing existed then you do the
two-way interaction as I suggested. If there is a three-way
interaction, then you would use Doug's approach of the interaction in
either males or females.

If there is an effect in both
 males and females but the effects go in opposite directions, then the 4 row
 implementation will resolve to 0 (no effect). Or am I misunderstanding
 something (again:)?

Nope. You are right. If the male and female effects are different,
then they could cancel each other out. If you suspect this to be the
case, then you should be able to demonstrate a three-way interaction.

 thanks!
 doug


 On 11/20/2012 01:50 PM, MCLAREN, Donald wrote:

 Bo,

 Doug asked me to chime in on your issue. Here are some points that you
 (and others) will hopefully find useful.

 (1) Inferences are two-step process. First, you create and estimate
 the design matrix. Every column in the design matrix accounts can
 account for some of the variance in the data. Second, you have
 contrasts that allow you to infer specific effects. Because the model
 contains your covariates, you are always controlling for the
 covariates and by extension any factor/covariate not in the contrast.

 (2) Forming contrasts is often the most difficult thing to do. I
 assume that your three factors (1, 2, and gender) are all
 between-subject factors. If one of them is a within-subject factor
 please let me know and disregard the rest of the email. The final
 F-contrast will have 4 rows (factor 1 levels-1)*(factor 2 levels
 -1)=(3-1)*(3-1)=2*2=4

 The following is an outline for creating contrasts:
 (a) Start simple - difference between levels of 1 factor
 (b) Define your null hypothesis: AO=AP=AQ
 (c) Make it equal to 0: AO-AP=0 AND AP-AQ=0
 (d) Repeat for the other levels of the factor...
 BO-BP=0 AND BP-BQ=0
 CO-CP=0 AND CP-CQ=0

 (e) Now combine them AO-AP=BO-BP=CO-CP AND AP-AQ=BP-BQ=CP-CQ

 (f) Make them equal to 0:
 AO-AP-BO+BP=0
 BO-BP-CO+CP=0
 AP-AQ-BP+BQ=0
 BP-BQ-CP+CQ=0

 (g) Expand them to include gender, for example:
 AO-AP-BO+BP=0 becomes FAO-FAP-FBO+FBP+MAO-MAP-MBO+MBP=0

 Since the contrast now has 2 columns per level, you should divide all
 values by 2. This will produce the correct amplitude and statistics.
 If you leave the values as 1 and -1, then you will have an incorrect
 amplitude, but the statistics will still be correct.

 (h) Fill in the respective columns of your design matrix.

 (3) The degrees of freedom are defined based on the rows of the
 F-matrix and the number of rows in the design matrix. The F-test has a
 numerator and denominator degrees of freedom. F(n,d).

 Best Regards, Donald McLaren
 =
 D.G. McLaren, Ph.D.
 Research Fellow, Department of Neurology, Massachusetts General Hospital
 and
 Harvard Medical School
 Postdoctoral Research Fellow, GRECC, Bedford VA
 Website: http://www.martinos.org/~mclaren
 Office: (773) 406-2464
 =
 This e-mail contains CONFIDENTIAL INFORMATION which may contain PROTECTED
 HEALTHCARE INFORMATION and may also be LEGALLY PRIVILEGED and which is
 intended only for the use of the individual or entity named above. If the
 reader of the e-mail is not the intended recipient or the employee or
 agent
 responsible for delivering it to the intended recipient, you are hereby
 notified that you are in possession of confidential and privileged
 information. Any unauthorized use, disclosure, copying or the taking of
 any
 action in reliance on the contents of this information is strictly
 prohibited and may be unlawful. If you have received this e-mail
 unintentionally, please immediately notify the sender via telephone at
 (773)
 406-2464 or email.


 On Tue, Nov 20, 2012 at 8:17 AM, xiangbo_2010xiangbo_2...@126.com
 wrote:

 Dear doug
 Thank you for your reply!
 +AOM -BOM -APM -BPM00000
   +AOM -BOM00 -AQM +BQM000
   +AOM0 -APM000 -COM +CPM0
   +AOM000 -AQM  

Re: [Freesurfer] contrast matrix

2012-11-21 Thread Douglas N Greve
Hi Bo, I don't understand the contrast you are trying to make. Are you 
really trying to compute the interaction between four variables (factor 
1, factor 2, gender, and age)?
doug

On 11/21/2012 10:49 AM, xiangbo_2010 wrote:
 Dear Donald McLaren
 Thank you for your reply! I make the contrast according to your method 
 is following,but I want to make interaction between factor 1 (A,B)and 
 factor 2(C,D,E), gender (M,F) and one continuous variable (age) as 
 covariates, the following contrast:
 2 -2 0 -2 2 0 2 -2 0 -2 2 0 0 0 0 0 0 0 0 0 0 0 0 0
 0 2 -2 0 -2 2 0 2 -2 0 -2 2 0 0 0 0 0 0 0 0 0 0 0 0

 is correct? Thanks!
 Bo Xiang





 At 2012-11-21 04:07:37,MCLAREN, Donaldmclaren.don...@gmail.com  
 mailto:mclaren.don...@gmail.com  wrote:
 On Tue, Nov 20, 2012 at 12:56 PM, Douglas N Greve
 gr...@nmr.mgh.harvard.edu  mailto:gr...@nmr.mgh.harvard.edu  wrote:
   Thanks Donald. Is this the standard way to do this? I had used 8 rows
   instead of 4 with the difference being that 8 rows gives you an 
  opportunity
   to look for an effect in males OR females.
 
 Yes. Having 8 rows would tell you if you have an interaction between
 factor 1 and 2 in either males or females. My 4 rows only tell you if
 the interaction exists. Technically speaking, one would run the
 three-way interaction first. If nothing existed then you do the
 two-way interaction as I suggested. If there is a three-way
 interaction, then you would use Doug's approach of the interaction in
 either males or females.
 
 If there is an effect in both
   males and females but the effects go in opposite directions, then the 4 
  row
   implementation will resolve to 0 (no effect). Or am I misunderstanding
   something (again:)?
 
 Nope. You are right. If the male and female effects are different,
 then they could cancel each other out. If you suspect this to be the
 case, then you should be able to demonstrate a three-way interaction.
 
   thanks!
   doug
 
 
   On 11/20/2012 01:50 PM, MCLAREN, Donald wrote:
 
   Bo,
 
   Doug asked me to chime in on your issue. Here are some points that you
   (and others) will hopefully find useful.
 
   (1) Inferences are two-step process. First, you create and estimate
   the design matrix. Every column in the design matrix accounts can
   account for some of the variance in the data. Second, you have
   contrasts that allow you to infer specific effects. Because the model
   contains your covariates, you are always controlling for the
   covariates and by extension any factor/covariate not in the contrast.
 
   (2) Forming contrasts is often the most difficult thing to do. I
   assume that your three factors (1, 2, and gender) are all
   between-subject factors. If one of them is a within-subject factor
   please let me know and disregard the rest of the email. The final
   F-contrast will have 4 rows (factor 1 levels-1)*(factor 2 levels
   -1)=(3-1)*(3-1)=2*2=4
 
   The following is an outline for creating contrasts:
   (a) Start simple - difference between levels of 1 factor
   (b) Define your null hypothesis: AO=AP=AQ
   (c) Make it equal to 0: AO-AP=0 AND AP-AQ=0
   (d) Repeat for the other levels of the factor...
   BO-BP=0 AND BP-BQ=0
   CO-CP=0 AND CP-CQ=0
 
   (e) Now combine them AO-AP=BO-BP=CO-CP AND AP-AQ=BP-BQ=CP-CQ
 
   (f) Make them equal to 0:
   AO-AP-BO+BP=0
   BO-BP-CO+CP=0
   AP-AQ-BP+BQ=0
   BP-BQ-CP+CQ=0
 
   (g) Expand them to include gender, for example:
   AO-AP-BO+BP=0 becomes FAO-FAP-FBO+FBP+MAO-MAP-MBO+MBP=0
 
   Since the contrast now has 2 columns per level, you should divide all
   values by 2. This will produce the correct amplitude and statistics.
   If you leave the values as 1 and -1, then you will have an incorrect
   amplitude, but the statistics will still be correct.
 
   (h) Fill in the respective columns of your design matrix.
 
   (3) The degrees of freedom are defined based on the rows of the
   F-matrix and the number of rows in the design matrix. The F-test has a
   numerator and denominator degrees of freedom. F(n,d).
 
   Best Regards, Donald McLaren
   =
   D.G. McLaren, Ph.D.
   Research Fellow, Department of Neurology, Massachusetts General Hospital
   and
   Harvard Medical School
   Postdoctoral Research Fellow, GRECC, Bedford VA
   Website: http://www.martinos.org/~mclaren
   Office: (773) 406-2464
   =
   This e-mail contains CONFIDENTIAL INFORMATION which may contain PROTECTED
   HEALTHCARE INFORMATION and may also be LEGALLY PRIVILEGED and which is
   intended only for the use of the individual or entity named above. If the
   reader of the e-mail is not the intended recipient or the employee or
   agent
   responsible for delivering it to the intended recipient, you are hereby
   notified that you are in possession of confidential and privileged
   information. Any unauthorized use, disclosure, copying or the taking of
   any
   action in reliance on the contents of this information is strictly
   prohibited and may be 

Re: [Freesurfer] contrast matrix

2012-11-21 Thread xiangbo_2010
No, I want to compute the interaction between factor 1 and factor 2 ,
gender and age as covariates. thanks

Bo Xiang

在 2012-11-22 04:22:06,Douglas N Greve gr...@nmr.mgh.harvard.edu 写道:
Hi Bo, I don't understand the contrast you are trying to make. Are you 
really trying to compute the interaction between four variables (factor 
1, factor 2, gender, and age)?
doug

On 11/21/2012 10:49 AM, xiangbo_2010 wrote:
 Dear Donald McLaren
 Thank you for your reply! I make the contrast according to your method 
 is following,but I want to make interaction between factor 1 (A,B)and 
 factor 2(C,D,E), gender (M,F) and one continuous variable (age) as 
 covariates, the following contrast:
 2 -2 0 -2 2 0 2 -2 0 -2 2 0 0 0 0 0 0 0 0 0 0 0 0 0
 0 2 -2 0 -2 2 0 2 -2 0 -2 2 0 0 0 0 0 0 0 0 0 0 0 0

 is correct? Thanks!
 Bo Xiang





 At 2012-11-21 04:07:37,MCLAREN, Donaldmclaren.don...@gmail.com  
 mailto:mclaren.don...@gmail.com  wrote:
 On Tue, Nov 20, 2012 at 12:56 PM, Douglas N Greve
 gr...@nmr.mgh.harvard.edu  mailto:gr...@nmr.mgh.harvard.edu  wrote:
   Thanks Donald. Is this the standard way to do this? I had used 8 rows
   instead of 4 with the difference being that 8 rows gives you an 
  opportunity
   to look for an effect in males OR females.
 
 Yes. Having 8 rows would tell you if you have an interaction between
 factor 1 and 2 in either males or females. My 4 rows only tell you if
 the interaction exists. Technically speaking, one would run the
 three-way interaction first. If nothing existed then you do the
 two-way interaction as I suggested. If there is a three-way
 interaction, then you would use Doug's approach of the interaction in
 either males or females.
 
 If there is an effect in both
   males and females but the effects go in opposite directions, then the 4 
  row
   implementation will resolve to 0 (no effect). Or am I misunderstanding
   something (again:)?
 
 Nope. You are right. If the male and female effects are different,
 then they could cancel each other out. If you suspect this to be the
 case, then you should be able to demonstrate a three-way interaction.
 
   thanks!
   doug
 
 
   On 11/20/2012 01:50 PM, MCLAREN, Donald wrote:
 
   Bo,
 
   Doug asked me to chime in on your issue. Here are some points that you
   (and others) will hopefully find useful.
 
   (1) Inferences are two-step process. First, you create and estimate
   the design matrix. Every column in the design matrix accounts can
   account for some of the variance in the data. Second, you have
   contrasts that allow you to infer specific effects. Because the model
   contains your covariates, you are always controlling for the
   covariates and by extension any factor/covariate not in the contrast.
 
   (2) Forming contrasts is often the most difficult thing to do. I
   assume that your three factors (1, 2, and gender) are all
   between-subject factors. If one of them is a within-subject factor
   please let me know and disregard the rest of the email. The final
   F-contrast will have 4 rows (factor 1 levels-1)*(factor 2 levels
   -1)=(3-1)*(3-1)=2*2=4
 
   The following is an outline for creating contrasts:
   (a) Start simple - difference between levels of 1 factor
   (b) Define your null hypothesis: AO=AP=AQ
   (c) Make it equal to 0: AO-AP=0 AND AP-AQ=0
   (d) Repeat for the other levels of the factor...
   BO-BP=0 AND BP-BQ=0
   CO-CP=0 AND CP-CQ=0
 
   (e) Now combine them AO-AP=BO-BP=CO-CP AND AP-AQ=BP-BQ=CP-CQ
 
   (f) Make them equal to 0:
   AO-AP-BO+BP=0
   BO-BP-CO+CP=0
   AP-AQ-BP+BQ=0
   BP-BQ-CP+CQ=0
 
   (g) Expand them to include gender, for example:
   AO-AP-BO+BP=0 becomes FAO-FAP-FBO+FBP+MAO-MAP-MBO+MBP=0
 
   Since the contrast now has 2 columns per level, you should divide all
   values by 2. This will produce the correct amplitude and statistics.
   If you leave the values as 1 and -1, then you will have an incorrect
   amplitude, but the statistics will still be correct.
 
   (h) Fill in the respective columns of your design matrix.
 
   (3) The degrees of freedom are defined based on the rows of the
   F-matrix and the number of rows in the design matrix. The F-test has a
   numerator and denominator degrees of freedom. F(n,d).
 
   Best Regards, Donald McLaren
   =
   D.G. McLaren, Ph.D.
   Research Fellow, Department of Neurology, Massachusetts General Hospital
   and
   Harvard Medical School
   Postdoctoral Research Fellow, GRECC, Bedford VA
   Website: http://www.martinos.org/~mclaren
   Office: (773) 406-2464
   =
   This e-mail contains CONFIDENTIAL INFORMATION which may contain 
  PROTECTED
   HEALTHCARE INFORMATION and may also be LEGALLY PRIVILEGED and which is
   intended only for the use of the individual or entity named above. If 
  the
   reader of the e-mail is not the intended recipient or the employee or
   agent
   responsible for delivering it to the intended recipient, you are hereby
   notified that you are in possession of confidential 

Re: [Freesurfer] contrast matrix

2012-11-21 Thread MCLAREN, Donald
Please explain what are the columns represent.

Best Regards, Donald McLaren
=
D.G. McLaren, Ph.D.
Research Fellow, Department of Neurology, Massachusetts General Hospital and
Harvard Medical School
Postdoctoral Research Fellow, GRECC, Bedford VA
Website: http://www.martinos.org/~mclaren
Office: (773) 406-2464
=
This e-mail contains CONFIDENTIAL INFORMATION which may contain PROTECTED
HEALTHCARE INFORMATION and may also be LEGALLY PRIVILEGED and which is
intended only for the use of the individual or entity named above. If the
reader of the e-mail is not the intended recipient or the employee or agent
responsible for delivering it to the intended recipient, you are hereby
notified that you are in possession of confidential and privileged
information. Any unauthorized use, disclosure, copying or the taking of any
action in reliance on the contents of this information is strictly
prohibited and may be unlawful. If you have received this e-mail
unintentionally, please immediately notify the sender via telephone at (773)
406-2464 or email.


On Wed, Nov 21, 2012 at 2:50 PM,  xiangbo_2...@126.com wrote:
 No, I want to compute the interaction between factor 1 and factor 2 ,
 gender and age as covariates. thanks

 Bo Xiang

 在 2012-11-22 04:22:06,Douglas N Greve gr...@nmr.mgh.harvard.edu 写道:
Hi Bo, I don't understand the contrast you are trying to make. Are you
really trying to compute the interaction between four variables (factor
1, factor 2, gender, and age)?
doug

On 11/21/2012 10:49 AM, xiangbo_2010 wrote:
 Dear Donald McLaren
 Thank you for your reply! I make the contrast according to your method
 is following,but I want to make interaction between factor 1 (A,B)and
 factor 2(C,D,E), gender (M,F) and one continuous variable (age) as
 covariates, the following contrast:
 2 -2 0 -2 2 0 2 -2 0 -2 2 0 0 0 0 0 0 0 0 0 0 0 0 0
 0 2 -2 0 -2 2 0 2 -2 0 -2 2 0 0 0 0 0 0 0 0 0 0 0 0

 is correct? Thanks!
 Bo Xiang





 At 2012-11-21 04:07:37,MCLAREN, Donaldmclaren.don...@gmail.com  
 mailto:mclaren.don...@gmail.com  wrote:
 On Tue, Nov 20, 2012 at 12:56 PM, Douglas N Greve
 gr...@nmr.mgh.harvard.edu  mailto:gr...@nmr.mgh.harvard.edu  wrote:
   Thanks Donald. Is this the standard way to do this? I had used 8 rows
   instead of 4 with the difference being that 8 rows gives you an 
  opportunity
   to look for an effect in males OR females.
 
 Yes. Having 8 rows would tell you if you have an interaction between
 factor 1 and 2 in either males or females. My 4 rows only tell you if
 the interaction exists. Technically speaking, one would run the
 three-way interaction first. If nothing existed then you do the
 two-way interaction as I suggested. If there is a three-way
 interaction, then you would use Doug's approach of the interaction in
 either males or females.
 
 If there is an effect in both
   males and females but the effects go in opposite directions, then the 4 
  row
   implementation will resolve to 0 (no effect). Or am I misunderstanding
   something (again:)?
 
 Nope. You are right. If the male and female effects are different,
 then they could cancel each other out. If you suspect this to be the
 case, then you should be able to demonstrate a three-way interaction.
 
   thanks!
   doug
 
 
   On 11/20/2012 01:50 PM, MCLAREN, Donald wrote:
 
   Bo,
 
   Doug asked me to chime in on your issue. Here are some points that you
   (and others) will hopefully find useful.
 
   (1) Inferences are two-step process. First, you create and estimate
   the design matrix. Every column in the design matrix accounts can
   account for some of the variance in the data. Second, you have
   contrasts that allow you to infer specific effects. Because the model
   contains your covariates, you are always controlling for the
   covariates and by extension any factor/covariate not in the contrast.
 
   (2) Forming contrasts is often the most difficult thing to do. I
   assume that your three factors (1, 2, and gender) are all
   between-subject factors. If one of them is a within-subject factor
   please let me know and disregard the rest of the email. The final
   F-contrast will have 4 rows (factor 1 levels-1)*(factor 2 levels
   -1)=(3-1)*(3-1)=2*2=4
 
   The following is an outline for creating contrasts:
   (a) Start simple - difference between levels of 1 factor
   (b) Define your null hypothesis: AO=AP=AQ
   (c) Make it equal to 0: AO-AP=0 AND AP-AQ=0
   (d) Repeat for the other levels of the factor...
   BO-BP=0 AND BP-BQ=0
   CO-CP=0 AND CP-CQ=0
 
   (e) Now combine them AO-AP=BO-BP=CO-CP AND AP-AQ=BP-BQ=CP-CQ
 
   (f) Make them equal to 0:
   AO-AP-BO+BP=0
   BO-BP-CO+CP=0
   AP-AQ-BP+BQ=0
   BP-BQ-CP+CQ=0
 
   (g) Expand them to include gender, for example:
   AO-AP-BO+BP=0 becomes FAO-FAP-FBO+FBP+MAO-MAP-MBO+MBP=0
 
   Since the contrast now has 2 columns per level, you should divide all
   values by 2. This will produce the correct amplitude and statistics.
   If you leave the 

Re: [Freesurfer] contrast matrix

2012-11-20 Thread xiangbo_2010
Dear doug
   Thank you for your reply!
+AOM -BOM -APM -BPM00000 
 +AOM -BOM00 -AQM +BQM000 
 +AOM0 -APM000 -COM +CPM0 
 +AOM000 -AQM  -COM0 +CQM  
there should be use 1 -1 or 0.5 -0.5? whether the -BPM should be change BPM?
Thanks
 
Bo Xiang




 


At 2012-11-19 07:23:31,Douglas Greve gr...@nmr.mgh.harvard.edu wrote:

Hi Bo, you can think of  the Ftest as a logical 'OR' between the t-test 
contrasts indicated in each row. Each row is a difference of differences, so

1. (A-B)om - (A-B)pm -- Does the difference between A and B differ between 
groups O and P for Males?
2. (A-B)om - (A-B)qm
3. (A-C)om - (A-C)pm
4. (A-C)om - (A-C)qm
5. (A-B)of - (A-B)pf -- Does the difference between A and B differ between 
groups O and P for Females?
6. (A-B)of - (A-B)qf
7. (A-C)of - (A-C)pf
8. (A-C)of - (A-C)pf

I've put together the first 9 columns of the first 4 rows. The last 9 columns 
are all 0s. For the last for rows, the 0s and below matrix are swapped to give 
you the same for the females

doug

 AOM  BOM  APM  BPM  AQM  BQM  COM  CPM  CQM 
--
 +AOM -BOM -APM -BPM00000 
 +AOM -BOM00 -AQM +BQM000 
 +AOM0 -APM000 -COM +CPM0 
 +AOM000 -AQM  -COM0 +CQM 
 



On 11/17/12 9:21 PM, xiangbo_2010 wrote:

Hi Freesurfer experts,
I'm very sorry to bother you, but I am very confused with the following 
questions:

My experimental design includes three discrete factors:  factor 1 with three 
levels (A,B,C ); factor 2 with three levels (O,P,Q); gender (F, M), and one 
covariate.

So I can get 18 classes: FAO, FAP,FAQ,FBO,FBP,FBQ,FCO,FCP,FCQ,MAO, 
MAP,MAQ,MBO,MBP,MBQ,MCO,MCP,MCQ.  I want to perform the interaction between 
factor 1 and factor 2 regressing out the effect of gender and one covariate, 
but I don't know the rules for setting the contrasts for the F-test.  The 
contrast matrix I used is:

1 1 1 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

1 -1 0 1 -1 0 1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

1 1 1 0 0 0 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

1 0 -1 1 0 -1 1 0 -1  0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 1 1 1 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 1 -1 0 1 -1 0 1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 1 0 -1 1 0 -1 1 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

is it correct?  

 

Any help will be very appreciated.

 

Best wishes,

 

Bo Xiang 















___
Freesurfer mailing list
freesur...@nmr.mgh.harvard.eduhttps://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.


Re: [Freesurfer] contrast matrix

2012-11-20 Thread MCLAREN, Donald
Bo,

Doug asked me to chime in on your issue. Here are some points that you
(and others) will hopefully find useful.

(1) Inferences are two-step process. First, you create and estimate
the design matrix. Every column in the design matrix accounts can
account for some of the variance in the data. Second, you have
contrasts that allow you to infer specific effects. Because the model
contains your covariates, you are always controlling for the
covariates and by extension any factor/covariate not in the contrast.

(2) Forming contrasts is often the most difficult thing to do. I
assume that your three factors (1, 2, and gender) are all
between-subject factors. If one of them is a within-subject factor
please let me know and disregard the rest of the email. The final
F-contrast will have 4 rows (factor 1 levels-1)*(factor 2 levels
-1)=(3-1)*(3-1)=2*2=4

The following is an outline for creating contrasts:
(a) Start simple - difference between levels of 1 factor
(b) Define your null hypothesis: AO=AP=AQ
(c) Make it equal to 0: AO-AP=0 AND AP-AQ=0
(d) Repeat for the other levels of the factor...
BO-BP=0 AND BP-BQ=0
CO-CP=0 AND CP-CQ=0

(e) Now combine them AO-AP=BO-BP=CO-CP AND AP-AQ=BP-BQ=CP-CQ

(f) Make them equal to 0:
AO-AP-BO+BP=0
BO-BP-CO+CP=0
AP-AQ-BP+BQ=0
BP-BQ-CP+CQ=0

(g) Expand them to include gender, for example:
AO-AP-BO+BP=0 becomes FAO-FAP-FBO+FBP+MAO-MAP-MBO+MBP=0

Since the contrast now has 2 columns per level, you should divide all
values by 2. This will produce the correct amplitude and statistics.
If you leave the values as 1 and -1, then you will have an incorrect
amplitude, but the statistics will still be correct.

(h) Fill in the respective columns of your design matrix.

(3) The degrees of freedom are defined based on the rows of the
F-matrix and the number of rows in the design matrix. The F-test has a
numerator and denominator degrees of freedom. F(n,d).

Best Regards, Donald McLaren
=
D.G. McLaren, Ph.D.
Research Fellow, Department of Neurology, Massachusetts General Hospital and
Harvard Medical School
Postdoctoral Research Fellow, GRECC, Bedford VA
Website: http://www.martinos.org/~mclaren
Office: (773) 406-2464
=
This e-mail contains CONFIDENTIAL INFORMATION which may contain PROTECTED
HEALTHCARE INFORMATION and may also be LEGALLY PRIVILEGED and which is
intended only for the use of the individual or entity named above. If the
reader of the e-mail is not the intended recipient or the employee or agent
responsible for delivering it to the intended recipient, you are hereby
notified that you are in possession of confidential and privileged
information. Any unauthorized use, disclosure, copying or the taking of any
action in reliance on the contents of this information is strictly
prohibited and may be unlawful. If you have received this e-mail
unintentionally, please immediately notify the sender via telephone at (773)
406-2464 or email.


On Tue, Nov 20, 2012 at 8:17 AM, xiangbo_2010 xiangbo_2...@126.com wrote:
 Dear doug
Thank you for your reply!
 +AOM -BOM -APM -BPM00000
  +AOM -BOM00 -AQM +BQM000
  +AOM0 -APM000 -COM +CPM0
  +AOM000 -AQM  -COM0 +CQM
 there should be use 1 -1 or 0.5 -0.5? whether the -BPM should be change BPM?
 Thanks

 Bo Xiang






 At 2012-11-19 07:23:31,Douglas Greve gr...@nmr.mgh.harvard.edu wrote:


 Hi Bo, you can think of  the Ftest as a logical 'OR' between the t-test
 contrasts indicated in each row. Each row is a difference of differences, so

 1. (A-B)om - (A-B)pm -- Does the difference between A and B differ between
 groups O and P for Males?
 2. (A-B)om - (A-B)qm
 3. (A-C)om - (A-C)pm
 4. (A-C)om - (A-C)qm
 5. (A-B)of - (A-B)pf -- Does the difference between A and B differ between
 groups O and P for Females?
 6. (A-B)of - (A-B)qf
 7. (A-C)of - (A-C)pf
 8. (A-C)of - (A-C)pf

 I've put together the first 9 columns of the first 4 rows. The last 9
 columns are all 0s. For the last for rows, the 0s and below matrix are
 swapped to give you the same for the females

 doug

  AOM  BOM  APM  BPM  AQM  BQM  COM  CPM  CQM
 --
  +AOM -BOM -APM -BPM00000
  +AOM -BOM00 -AQM +BQM000
  +AOM0 -APM000 -COM +CPM0  ! nbsp;nb sp;
  +AOM000 -AQM  -COM0 +CQM



 On 11/17/12 9:21 PM, xiangbo_2010 wrote:

 Hi Freesurfer experts,

 I'm very sorry to bother you, but I am very confused with the following
 questions:

 My experimental design includes three discrete factors:  factor 1 with three
 levels (A,B,C ); factor 2 with three levels (O,P,Q); gender (F, M), and one
 covariate.

 So I can get 18 classes: FAO, FAP,FAQ,FBO,FBP,FBQ,FCO,FCP,FCQ,MAO,
 MAP,MAQ,MBO,MBP,MBQ,MCO,MCP,MCQ.  I want to perform the interaction between
 factor 1 and factor 2 regressing out the effect of gender and one covariate,
 but 

Re: [Freesurfer] contrast matrix

2012-11-20 Thread Douglas N Greve
Yes, that -BPM should be +BPM, sorry about that. It will not change the 
p-values if you multiply by 0.5 or not. It will change the size of the 
contrast. Most people don't report this number, especially for an 
F-test, so I would not worry about it.
doug

On 11/20/2012 09:17 AM, xiangbo_2010 wrote:
 Dear doug
 Thank you for your reply!
 +AOM -BOM -APM -BPM 0 0 0 0 0
 +AOM -BOM 0 0 -AQM +BQM 0 0 0
 +AOM 0 -APM 0 0 0 -COM +CPM 0
 +AOM 0 0 0 -AQM -COM 0 +CQM
 there should be use 1 -1 or 0.5 -0.5? whether the -BPM should be 
 change BPM?
 Thanks
 Bo Xiang





 At 2012-11-19 07:23:31,Douglas Greve gr...@nmr.mgh.harvard.edu 
 mailto:gr...@nmr.mgh.harvard.edu wrote:


 Hi Bo, you can think of the Ftest as a logical 'OR' between the
 t-test contrasts indicated in each row. Each row is a difference
 of differences, so

 1. (A-B)om - (A-B)pm -- Does the difference between A and B
 differ between groups O and P for Males?
 2. (A-B)om - (A-B)qm
 3. (A-C)om - (A-C)pm
 4. (A-C)om - (A-C)qm
 5. (A-B)of - (A-B)pf -- Does the difference between A and B
 differ between groups O and P for Females?
 6. (A-B)of - (A-B)qf
 7. (A-C)of - (A-C)pf
 8. (A-C)of - (A-C)pf

 I've put together the first 9 columns of the first 4 rows. The
 last 9 columns are all 0s. For the last for rows, the 0s and below
 matrix are swapped to give you the same for the females

 doug

 AOM BOM APM BPM AQM BQM COM CPM CQM
 --
 +AOM -BOM -APM -BPM 0 0 0 0 0
 +AOM -BOM 0 0 -AQM +BQM 0 0 0
 +AOM 0 -APM 0 0 0 -COM +CPM 0 nb sp;
 +AOM 0 0 0 -AQM -COM 0 +CQM



 On 11/17/12 9:21 PM, xiangbo_2010 wrote:
 Hi Freesurfer experts,

 I'm very sorry to bother you, but I am very confused with the
 following questions:

 My experimental design includes three discrete factors:
 factor 1 with three levels (A,B,C ); factor 2 with three
 levels (O,P,Q); gender (F, M), and one covariate.

 So I can get 18 classes: FAO,
 FAP,FAQ,FBO,FBP,FBQ,FCO,FCP,FCQ,MAO,
 MAP,MAQ,MBO,MBP,MBQ,MCO,MCP,MCQ.I want to perform the
 interaction between factor 1 and factor 2 regressing out the
 effect of gender and one covariate, but I don't know the
 rules for setting the contrasts for the F-test. The contrast
 matrix I used is:

 1 1 1 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0

 1 -1 0 1 -1 0 1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0

 1 1 1 0 0 0 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0

 1 0 -1 1 0 -1 1 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0

 0 0 0 0 0 0 0 0 0 1 1 1 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0

 0 0 0 0 0 0 0 0 0 1 -1 0 1 -1 0 1 -1 0 0 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0

 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0

 0 0 0 0 0 0 0 0 0 1 0 -1 1 0 -1 1 0 -1 0 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0

 is it correct?

 Any help will be very appreciated.

 Best wishes,

 Bo Xiang











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




-- 
Douglas N. Greve, Ph.D.
MGH-NMR Center
gr...@nmr.mgh.harvard.edu
Phone Number: 617-724-2358
Fax: 617-726-7422

Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
FileDrop: www.nmr.mgh.harvard.edu/facility/filedrop/index.html
Outgoing: ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/

___
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.



Re: [Freesurfer] contrast matrix

2012-11-20 Thread Douglas N Greve
Thanks Donald. Is this the standard way to do this? I had used 8 rows 
instead of 4 with the difference being that 8 rows gives you an 
opportunity to look for an effect in males OR females. If there is an 
effect in both males and females but the effects go in opposite 
directions, then the 4 row implementation will resolve to 0 (no effect). 
Or am I misunderstanding something (again:)?
thanks!
doug

On 11/20/2012 01:50 PM, MCLAREN, Donald wrote:
 Bo,

 Doug asked me to chime in on your issue. Here are some points that you
 (and others) will hopefully find useful.

 (1) Inferences are two-step process. First, you create and estimate
 the design matrix. Every column in the design matrix accounts can
 account for some of the variance in the data. Second, you have
 contrasts that allow you to infer specific effects. Because the model
 contains your covariates, you are always controlling for the
 covariates and by extension any factor/covariate not in the contrast.

 (2) Forming contrasts is often the most difficult thing to do. I
 assume that your three factors (1, 2, and gender) are all
 between-subject factors. If one of them is a within-subject factor
 please let me know and disregard the rest of the email. The final
 F-contrast will have 4 rows (factor 1 levels-1)*(factor 2 levels
 -1)=(3-1)*(3-1)=2*2=4

 The following is an outline for creating contrasts:
 (a) Start simple - difference between levels of 1 factor
 (b) Define your null hypothesis: AO=AP=AQ
 (c) Make it equal to 0: AO-AP=0 AND AP-AQ=0
 (d) Repeat for the other levels of the factor...
 BO-BP=0 AND BP-BQ=0
 CO-CP=0 AND CP-CQ=0

 (e) Now combine them AO-AP=BO-BP=CO-CP AND AP-AQ=BP-BQ=CP-CQ

 (f) Make them equal to 0:
 AO-AP-BO+BP=0
 BO-BP-CO+CP=0
 AP-AQ-BP+BQ=0
 BP-BQ-CP+CQ=0

 (g) Expand them to include gender, for example:
 AO-AP-BO+BP=0 becomes FAO-FAP-FBO+FBP+MAO-MAP-MBO+MBP=0

 Since the contrast now has 2 columns per level, you should divide all
 values by 2. This will produce the correct amplitude and statistics.
 If you leave the values as 1 and -1, then you will have an incorrect
 amplitude, but the statistics will still be correct.

 (h) Fill in the respective columns of your design matrix.

 (3) The degrees of freedom are defined based on the rows of the
 F-matrix and the number of rows in the design matrix. The F-test has a
 numerator and denominator degrees of freedom. F(n,d).

 Best Regards, Donald McLaren
 =
 D.G. McLaren, Ph.D.
 Research Fellow, Department of Neurology, Massachusetts General Hospital and
 Harvard Medical School
 Postdoctoral Research Fellow, GRECC, Bedford VA
 Website: http://www.martinos.org/~mclaren
 Office: (773) 406-2464
 =
 This e-mail contains CONFIDENTIAL INFORMATION which may contain PROTECTED
 HEALTHCARE INFORMATION and may also be LEGALLY PRIVILEGED and which is
 intended only for the use of the individual or entity named above. If the
 reader of the e-mail is not the intended recipient or the employee or agent
 responsible for delivering it to the intended recipient, you are hereby
 notified that you are in possession of confidential and privileged
 information. Any unauthorized use, disclosure, copying or the taking of any
 action in reliance on the contents of this information is strictly
 prohibited and may be unlawful. If you have received this e-mail
 unintentionally, please immediately notify the sender via telephone at (773)
 406-2464 or email.


 On Tue, Nov 20, 2012 at 8:17 AM, xiangbo_2010xiangbo_2...@126.com  wrote:
 Dear doug
 Thank you for your reply!
 +AOM -BOM -APM -BPM00000
   +AOM -BOM00 -AQM +BQM000
   +AOM0 -APM000 -COM +CPM0
   +AOM000 -AQM  -COM0 +CQM
 there should be use 1 -1 or 0.5 -0.5? whether the -BPM should be change BPM?
 Thanks

 Bo Xiang






 At 2012-11-19 07:23:31,Douglas Grevegr...@nmr.mgh.harvard.edu  wrote:


 Hi Bo, you can think of  the Ftest as a logical 'OR' between the t-test
 contrasts indicated in each row. Each row is a difference of differences, so

 1. (A-B)om - (A-B)pm --  Does the difference between A and B differ between
 groups O and P for Males?
 2. (A-B)om - (A-B)qm
 3. (A-C)om - (A-C)pm
 4. (A-C)om - (A-C)qm
 5. (A-B)of - (A-B)pf --  Does the difference between A and B differ between
 groups O and P for Females?
 6. (A-B)of - (A-B)qf
 7. (A-C)of - (A-C)pf
 8. (A-C)of - (A-C)pf

 I've put together the first 9 columns of the first 4 rows. The last 9
 columns are all 0s. For the last for rows, the 0s and below matrix are
 swapped to give you the same for the females

 doug

   AOM  BOM  APM  BPM  AQM  BQM  COM  CPM  CQM
 --
   +AOM -BOM -APM -BPM00000
   +AOM -BOM00 -AQM +BQM000
   +AOM0 -APM000 -COM +CPM0! nbsp;nb sp;
   +AOM000 -AQM  -COM0 +CQM



 On 11/17/12 9:21 PM, 

Re: [Freesurfer] contrast matrix

2012-11-20 Thread MCLAREN, Donald
On Tue, Nov 20, 2012 at 12:56 PM, Douglas N Greve
gr...@nmr.mgh.harvard.edu wrote:
 Thanks Donald. Is this the standard way to do this? I had used 8 rows
 instead of 4 with the difference being that 8 rows gives you an opportunity
 to look for an effect in males OR females.

Yes. Having 8 rows would tell you if you have an interaction between
factor 1 and 2 in either males or females. My 4 rows only tell you if
the interaction exists. Technically speaking, one would run the
three-way interaction first. If nothing existed then you do the
two-way interaction as I suggested. If there is a three-way
interaction, then you would use Doug's approach of the interaction in
either males or females.

If there is an effect in both
 males and females but the effects go in opposite directions, then the 4 row
 implementation will resolve to 0 (no effect). Or am I misunderstanding
 something (again:)?

Nope. You are right. If the male and female effects are different,
then they could cancel each other out. If you suspect this to be the
case, then you should be able to demonstrate a three-way interaction.

 thanks!
 doug


 On 11/20/2012 01:50 PM, MCLAREN, Donald wrote:

 Bo,

 Doug asked me to chime in on your issue. Here are some points that you
 (and others) will hopefully find useful.

 (1) Inferences are two-step process. First, you create and estimate
 the design matrix. Every column in the design matrix accounts can
 account for some of the variance in the data. Second, you have
 contrasts that allow you to infer specific effects. Because the model
 contains your covariates, you are always controlling for the
 covariates and by extension any factor/covariate not in the contrast.

 (2) Forming contrasts is often the most difficult thing to do. I
 assume that your three factors (1, 2, and gender) are all
 between-subject factors. If one of them is a within-subject factor
 please let me know and disregard the rest of the email. The final
 F-contrast will have 4 rows (factor 1 levels-1)*(factor 2 levels
 -1)=(3-1)*(3-1)=2*2=4

 The following is an outline for creating contrasts:
 (a) Start simple - difference between levels of 1 factor
 (b) Define your null hypothesis: AO=AP=AQ
 (c) Make it equal to 0: AO-AP=0 AND AP-AQ=0
 (d) Repeat for the other levels of the factor...
 BO-BP=0 AND BP-BQ=0
 CO-CP=0 AND CP-CQ=0

 (e) Now combine them AO-AP=BO-BP=CO-CP AND AP-AQ=BP-BQ=CP-CQ

 (f) Make them equal to 0:
 AO-AP-BO+BP=0
 BO-BP-CO+CP=0
 AP-AQ-BP+BQ=0
 BP-BQ-CP+CQ=0

 (g) Expand them to include gender, for example:
 AO-AP-BO+BP=0 becomes FAO-FAP-FBO+FBP+MAO-MAP-MBO+MBP=0

 Since the contrast now has 2 columns per level, you should divide all
 values by 2. This will produce the correct amplitude and statistics.
 If you leave the values as 1 and -1, then you will have an incorrect
 amplitude, but the statistics will still be correct.

 (h) Fill in the respective columns of your design matrix.

 (3) The degrees of freedom are defined based on the rows of the
 F-matrix and the number of rows in the design matrix. The F-test has a
 numerator and denominator degrees of freedom. F(n,d).

 Best Regards, Donald McLaren
 =
 D.G. McLaren, Ph.D.
 Research Fellow, Department of Neurology, Massachusetts General Hospital
 and
 Harvard Medical School
 Postdoctoral Research Fellow, GRECC, Bedford VA
 Website: http://www.martinos.org/~mclaren
 Office: (773) 406-2464
 =
 This e-mail contains CONFIDENTIAL INFORMATION which may contain PROTECTED
 HEALTHCARE INFORMATION and may also be LEGALLY PRIVILEGED and which is
 intended only for the use of the individual or entity named above. If the
 reader of the e-mail is not the intended recipient or the employee or
 agent
 responsible for delivering it to the intended recipient, you are hereby
 notified that you are in possession of confidential and privileged
 information. Any unauthorized use, disclosure, copying or the taking of
 any
 action in reliance on the contents of this information is strictly
 prohibited and may be unlawful. If you have received this e-mail
 unintentionally, please immediately notify the sender via telephone at
 (773)
 406-2464 or email.


 On Tue, Nov 20, 2012 at 8:17 AM, xiangbo_2010xiangbo_2...@126.com
 wrote:

 Dear doug
 Thank you for your reply!
 +AOM -BOM -APM -BPM00000
   +AOM -BOM00 -AQM +BQM000
   +AOM0 -APM000 -COM +CPM0
   +AOM000 -AQM  -COM0 +CQM
 there should be use 1 -1 or 0.5 -0.5? whether the -BPM should be change
 BPM?
 Thanks

 Bo Xiang






 At 2012-11-19 07:23:31,Douglas Grevegr...@nmr.mgh.harvard.edu  wrote:


 Hi Bo, you can think of  the Ftest as a logical 'OR' between the t-test
 contrasts indicated in each row. Each row is a difference of differences,
 so

 1. (A-B)om - (A-B)pm --  Does the difference between A and B differ
 between
 groups O and P for Males?
 2. (A-B)om - (A-B)qm
 3. (A-C)om - (A-C)pm
 4. (A-C)om - (A-C)qm
 5. 

Re: [Freesurfer] contrast matrix

2012-11-18 Thread Douglas Greve


Hi Bo, you can think of  the Ftest as a logical 'OR' between the t-test 
contrasts indicated in each row. Each row is a difference of differences, so


1. (A-B)om - (A-B)pm -- Does the difference between A and B differ 
between groups O and P for Males?

2. (A-B)om - (A-B)qm
3. (A-C)om - (A-C)pm
4. (A-C)om - (A-C)qm
5. (A-B)of - (A-B)pf -- Does the difference between A and B differ 
between groups O and P for Females?

6. (A-B)of - (A-B)qf
7. (A-C)of - (A-C)pf
8. (A-C)of - (A-C)pf

I've put together the first 9 columns of the first 4 rows. The last 9 
columns are all 0s. For the last for rows, the 0s and below matrix are 
swapped to give you the same for the females


doug

 AOM  BOM  APM  BPM  AQM  BQM  COM  CPM CQM
--
 +AOM -BOM -APM -BPM0000 0
 +AOM -BOM00 -AQM +BQM00 0
 +AOM0 -APM000 -COM +CPM 0
 +AOM000 -AQM  -COM0 +CQM



On 11/17/12 9:21 PM, xiangbo_2010 wrote:

Hi Freesurfer experts,

I'm very sorry to bother you, but I am very confused with the
following questions:

My experimental design includes three discrete factors:  factor
1 with three levels (A,B,C ); factor 2 with three levels (O,P,Q);
gender (F, M), and one covariate.

So I can get 18 classes: FAO, FAP,FAQ,FBO,FBP,FBQ,FCO,FCP,FCQ,MAO,
MAP,MAQ,MBO,MBP,MBQ,MCO,MCP,MCQ.I want to perform the interaction
between factor 1 and factor 2 regressing out the effect of gender
and one covariate, but I don't know the rules for setting the
contrasts for the F-test.  The contrast matrix I used is:

1 1 1 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0

1 -1 0 1 -1 0 1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0

1 1 1 0 0 0 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0

1 0 -1 1 0 -1 1 0 -1  0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0

0 0 0 0 0 0 0 0 0 1 1 1 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0

0 0 0 0 0 0 0 0 0 1 -1 0 1 -1 0 1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0

0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0

0 0 0 0 0 0 0 0 0 1 0 -1 1 0 -1 1 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0

is it correct?

Any help will be very appreciated.

Best wishes,

Bo Xiang











___
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.


Re: [Freesurfer] contrast matrix

2012-11-18 Thread Yizhou Ma
Hi Doug,

Thanks for replying. Yet I have a question on this matrix. From what I see,
each row corresponds to one contrast, which has one df. Thus why are we
having 8 rows while the interaction has a df of 4?

Thanks,
Cherry

On Sun, Nov 18, 2012 at 6:23 PM, Douglas Greve gr...@nmr.mgh.harvard.eduwrote:


 Hi Bo, you can think of  the Ftest as a logical 'OR' between the t-test
 contrasts indicated in each row. Each row is a difference of differences, so

 1. (A-B)om - (A-B)pm -- Does the difference between A and B differ
 between groups O and P for Males?
 2. (A-B)om - (A-B)qm
 3. (A-C)om - (A-C)pm
 4. (A-C)om - (A-C)qm
 5. (A-B)of - (A-B)pf -- Does the difference between A and B differ
 between groups O and P for Females?
 6. (A-B)of - (A-B)qf
 7. (A-C)of - (A-C)pf
 8. (A-C)of - (A-C)pf

 I've put together the first 9 columns of the first 4 rows. The last 9
 columns are all 0s. For the last for rows, the 0s and below matrix are
 swapped to give you the same for the females

 doug

  AOM  BOM  APM  BPM  AQM  BQM  COM  CPM
 CQM
 --
  +AOM -BOM -APM -BPM0000
 0
  +AOM -BOM00 -AQM +BQM00
 0
  +AOM0 -APM000 -COM +CPM
 0
  +AOM000 -AQM  -COM0
 +CQM



 On 11/17/12 9:21 PM, xiangbo_2010 wrote:

   Hi Freesurfer experts,

  I'm very sorry to bother you, but I am very confused with the following
 questions:

 My experimental design includes three discrete factors:  factor
 1 with three levels (A,B,C ); factor 2 with three levels (O,P,Q); gender
 (F, M), and one covariate.

 So I can get 18 classes: FAO, FAP,FAQ,FBO,FBP,FBQ,FCO,FCP,FCQ,MAO,
 MAP,MAQ,MBO,MBP,MBQ,MCO,MCP,MCQ.  I want to perform the interaction
 between factor 1 and factor 2 regressing out the effect of gender and one
 covariate, but I don't know the rules for setting the contrasts for the
 F-test.  The contrast matrix I used is:

 1 1 1 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

 1 -1 0 1 -1 0 1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

 1 1 1 0 0 0 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

 1 0 -1 1 0 -1 1 0 -1  0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
 0

 0 0 0 0 0 0 0 0 0 1 1 1 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
 0

 0 0 0 0 0 0 0 0 0 1 -1 0 1 -1 0 1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
 0

 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
 0

 0 0 0 0 0 0 0 0 0 1 0 -1 1 0 -1 1 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
 0

 is it correct?



 Any help will be very appreciated.



 Best wishes,



 Bo Xiang










 ___
 Freesurfer mailing 
 listfreesur...@nmr.mgh.harvard.eduhttps://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


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] contrast matrix

2012-11-17 Thread xiangbo_2010
Hi Freesurfer experts,
I'm very sorry to bother you, but I am very confused with the following 
questions:

My experimental design includes three discrete factors:  factor 1 with three 
levels (A,B,C ); factor 2 with three levels (O,P,Q); gender (F, M), and one 
covariate.

So I can get 18 classes: FAO, FAP,FAQ,FBO,FBP,FBQ,FCO,FCP,FCQ,MAO, 
MAP,MAQ,MBO,MBP,MBQ,MCO,MCP,MCQ.  I want to perform the interaction between 
factor 1 and factor 2 regressing out the effect of gender and one covariate, 
but I don't know the rules for setting the contrasts for the F-test.  The 
contrast matrix I used is:

1 1 1 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

1 -1 0 1 -1 0 1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

1 1 1 0 0 0 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

1 0 -1 1 0 -1 1 0 -1  0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 1 1 1 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 1 -1 0 1 -1 0 1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 1 0 -1 1 0 -1 1 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

is it correct?  

 

Any help will be very appreciated.

 

Best wishes,

 

Bo Xiang 









___
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.


Re: [Freesurfer] contrast matrix

2012-11-17 Thread Yizhou Ma
Hi Bo,

I'm definitely not an expert of this, but I see that you really nead some
help, so I tried to look at your matrix. From my humble opinion it doesn't
look correct. Firstly, the first 9 groups are male groups and the last 9
are female groups. Then why are all female groups assigned 0 in the matrix?
Secondly, since the interaction you are interested in have a df of 4, do
you think maybe you should have 4 rows rather than 8 in your matrix?

Cherry

On Sat, Nov 17, 2012 at 9:21 PM, xiangbo_2010 xiangbo_2...@126.com wrote:

  Hi Freesurfer experts,

  I'm very sorry to bother you, but I am very confused with the following
 questions:

 My experimental design includes three discrete factors:  factor
 1 with three levels (A,B,C ); factor 2 with three levels (O,P,Q); gender
 (F, M), and one covariate.

 So I can get 18 classes: FAO, FAP,FAQ,FBO,FBP,FBQ,FCO,FCP,FCQ,MAO,
 MAP,MAQ,MBO,MBP,MBQ,MCO,MCP,MCQ.  I want to perform the interaction
 between factor 1 and factor 2 regressing out the effect of gender and one
 covariate, but I don't know the rules for setting the contrasts for the
 F-test.  The contrast matrix I used is:

 1 1 1 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

 1 -1 0 1 -1 0 1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

 1 1 1 0 0 0 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

 1 0 -1 1 0 -1 1 0 -1  0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
 0

 0 0 0 0 0 0 0 0 0 1 1 1 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
 0

 0 0 0 0 0 0 0 0 0 1 -1 0 1 -1 0 1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
 0

 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
 0

 0 0 0 0 0 0 0 0 0 1 0 -1 1 0 -1 1 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
 0

 is it correct?



 Any help will be very appreciated.



 Best wishes,



 Bo Xiang









 ___
 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.


Re: [Freesurfer] contrast matrix

2012-11-17 Thread xiangbo_2010
Dear Cherry
   I our analysis, the gender as a Covariate, so  all female groups assigned 0 
in the matrix, following is new matrix:
1 -1 -1 -1 -1 -1 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1-1 -1 0 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 1 -1 -1 -1 -1 -1 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 1-1 -1 0 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

is it correct?  

 

Any help will be very appreciated.

 

Best wishes,

 

Bo Xiang 










At 2012-11-18 10:51:07,Yizhou Ma ym...@nyu.edu wrote:
Hi Bo,

I'm definitely not an expert of this, but I see that you really nead some help, 
so I tried to look at your matrix. From my humble opinion it doesn't look 
correct. Firstly, the first 9 groups are male groups and the last 9 are female 
groups. Then why are all female groups assigned 0 in the matrix? Secondly, 
since the interaction you are interested in have a df of 4, do you think maybe 
you should have 4 rows rather than 8 in your matrix?

Cherry


On Sat, Nov 17, 2012 at 9:21 PM, xiangbo_2010 xiangbo_2...@126.com wrote:

Hi Freesurfer experts,
I'm very sorry to bother you, but I am very confused with the following 
questions:

My experimental design includes three discrete factors:  factor 1 with three 
levels (A,B,C ); factor 2 with three levels (O,P,Q); gender (F, M), and one 
covariate.

So I can get 18 classes: FAO, FAP,FAQ,FBO,FBP,FBQ,FCO,FCP,FCQ,MAO, 
MAP,MAQ,MBO,MBP,MBQ,MCO,MCP,MCQ.  I want to perform the interaction between 
factor 1 and factor 2 regressing out the effect of gender and one covariate, 
but I don't know the rules for setting the contrasts for the F-test.  The 
contrast matrix I used is:

1 1 1 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

1 -1 0 1 -1 0 1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

1 1 1 0 0 0 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

1 0 -1 1 0 -1 1 0 -1  0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 1 1 1 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 1 -1 0 1 -1 0 1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 1 0 -1 1 0 -1 1 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

is it correct?  

 

Any help will be very appreciated.

 

Best wishes,

 

Bo Xiang 













___
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] contrast matrix

2012-11-16 Thread xiangbo_2010
Hi Freesurfer experts,
I'm very sorry to bother you, but I am very confused with the following 
questions:

My experimental design includes three discrete factors:  factor 1 with three 
levels (A,B,C ); factor 2 with three levels (O,P,Q); gender (F, M), and one 
covariate.

So I can get 18 classes: FAO, FAP,FAQ,FBO,FBP,FBQ,FCO,FCP,FCQ,MAO, 
MAP,MAQ,MBO,MBP,MBQ,MCO,MCP,MCQ.  I want to perform the interaction between 
factor 1 and factor 2 regressing out the effect of gender and one covariate, 
but I don't know the rules for setting the contrasts for the F-test.  The 
contrast matrix I used is:

1 1 1 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

1 -1 0 1 -1 0 1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

1 1 1 0 0 0 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

1 0 -1 1 0 -1 1 0 -1  0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 1 1 1 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 1 -1 0 1 -1 0 1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 1 0 -1 1 0 -1 1 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

is it correct?  

 

Any help will be very appreciated.

 

Best wishes,

 

Bo Xiang 






___
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] contrast matrix

2012-11-13 Thread xiangbo_2010
Hi Freesurfer experts,
I'm very sorry to bother you, but I am very confused with the following 
questions:

My experimental design includes two discrete factors:  genotype with three 
levels (GG,GA,AA ); gender (F, M), and one covariate.

So I can get 6 classes: MGG, MGA,MAA, FGG,FGA,FAA.

1)  I want to perform the difference between any of the genotype leves analysis 
with regressing out the effect of gender and one covariate, but I don't know 
the rules for setting the contrasts for the F-test.  The contrast matrix I used 
is:

[1 -1 0 1 -1 0 0 0 0 0 0 0 ]/2

[1 0 -1 1 0 -1 0 0 0 0 0 0 ]/2 

is it correct?  

 

Any help will be very appreciated.

 

Best wishes,

 

Meng Li

 






___
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] contrast matrix

2012-11-13 Thread xiangbo_2010
 
 
Hi Freesurfer experts,
I'm very sorry to bother you, but I am very confused with the following 
questions:

My experimental design includes two discrete factors:  genotype with three 
levels (GG,GA,AA ); gender (F, M), and one covariate.

So I can get 6 classes: MGG, MGA,MAA, FGG,FGA,FAA.

1)  I want to perform the difference between any of the genotype leves analysis 
with regressing out the effect of gender and one covariate, but I don't know 
the rules for setting the contrasts for the F-test.  The contrast matrix I used 
is:

[1 -1 0 1 -1 0 0 0 0 0 0 0 ]/2

[1 0 -1 1 0 -1 0 0 0 0 0 0 ]/2 

is it correct?  

 

Any help will be very appreciated.

 

Best wishes,

 

Bo Xiang 









___
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.


Re: [Freesurfer] contrast matrix

2012-11-13 Thread Douglas N Greve

That contrast will do what you want but a more general one would be
[1 -1 0 0 0 0 0 0 0 0 0 0]
[0 0 0 1 -1 0 0 0 0 0 0 0]
[1 0 -1 0 0 0 0 0 0 0 0 0]
[0 0 0 1 0 -1 0 0 0 0 0 0]

This will return positive if there is any difference between the 
genotypes regardless of gender. In your contrast, you could have a 
situation where the G-A difference is positive for males but negative 
for females in which case they would cancel each other out.

doug


On 11/13/2012 08:50 AM, xiangbo_2010 wrote:
Hi Freesurfer experts,

I'm very sorry to bother you, but I am very confused with the
following questions:

My experimental design includes two discrete factors: genotype
with three levels (GG,GA,AA ); gender (F, M), and one covariate.

So I can get 6 classes: MGG, MGA,MAA, FGG,FGA,FAA.

1) I want to perform the difference between any of the genotype
leves analysis with regressing out the effect of gender and one
covariate, but I don't know the rules for setting the contrasts for
the F-test.  The contrast matrix I used is:

[1 -1 0 1 -1 0 0 0 0 0 0 0 ]/2

[1 0 -1 1 0 -1 0 0 0 0 0 0 ]/2

is it correct?

Any help will be very appreciated.

Best wishes,

Bo Xiang

-- 
Douglas N. Greve, Ph.D.
MGH-NMR Center
gr...@nmr.mgh.harvard.edu
Phone Number: 617-724-2358
Fax: 617-726-7422

Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
FileDrop: www.nmr.mgh.harvard.edu/facility/filedrop/index.html

___
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.



Re: [Freesurfer] Contrast matrix

2012-09-07 Thread Meng Li
Hi professor,
Thanks for your reply.
When I perform the main effect of dignosis, is the following  matrix I used 
correct?
 0.25 0.25 0.25 0.25 -0.25 -0.25 -0.25 -0.25 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0  
(I think it regressed out the effect of genotype and gender, that is it takes 
the genotype as a covariable)

 Or I  should create another fsgd file, that has 4 classes: AF, AM, BF, BM. And 
I can use the matrix (0.5 0.5 -0.5 -0.5 0 0 0 0 0 0 0 0) to perform the main 
effect of diagnosis.
 Which one of two mentioned matrix is right?
 
Thanks a lot.
 
Best wishes
 
Meng
___
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.


Re: [Freesurfer] Contrast matrix

2012-09-07 Thread Douglas N Greve

That is the correct matrix to use. You can create a new FSGD file (and 
the second matrix would be correct for it), but you do not have to. It 
will save you a few degrees of freedom.
doug



On 09/07/2012 05:49 AM, Meng Li wrote:
 Hi professor,
 Thanks for your reply.
 When I perform the main effect of dignosis, is the following matrix I 
 used correct?
 0.25 0.25 0.25 0.25 -0.25 -0.25 -0.25 -0.25 0 0 0 0 0 0 0 0 0 0 0 0 0 
 0 0 0 (I think it regressed out the effect of genotype and gender, 
 that is it takes the genotype as a covariable)

 Or I should create another fsgd file, that has 4 classes: AF, AM, BF, 
 BM. And I can use the matrix (0.5 0.5 -0.5 -0.5 0 0 0 0 0 0 0 0) to 
 perform the main effect of diagnosis.
 Which one of two mentioned matrix is right?
 Thanks a lot.
 Best wishes
 Meng



-- 
Douglas N. Greve, Ph.D.
MGH-NMR Center
gr...@nmr.mgh.harvard.edu
Phone Number: 617-724-2358
Fax: 617-726-7422

Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
FileDrop: www.nmr.mgh.harvard.edu/facility/filedrop/index.html

___
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.



Re: [Freesurfer] Contrast matrix

2012-09-07 Thread Douglas N Greve
Use the significant clusters as ROIs
doug

On 09/07/2012 10:43 AM, Meng Li wrote:
 Hi professor,
 Thanks for your letter.
 When I perform the analysis of interaction by using the matrix:
 0.25 0.25 -0.25 -0.25 -0.25 -0.25 0.25 0.25 0 0 0 0 0 0 0 0 0 0 0 0 0 
 0 0 0
 I get the significant clusters which have interaction. Then I do post 
 hoc analysis, that is, I want to analyze the effect of two genotype on 
 the A group (or B group), should I use the significant clusters as 
 ROIs, or analyze on the whole brain directly?

 At 2012-09-07 22:12:25,Douglas N Grevegr...@nmr.mgh.harvard.edu  wrote:
 
 That is the correct matrix to use. You can create a new FSGD file (and
 the second matrix would be correct for it), but you do not have to. It
 will save you a few degrees of freedom.
 doug
 
 
 
 On 09/07/2012 05:49 AM, Meng Li wrote:
   Hi professor,
   Thanks for your reply.
   When I perform the main effect of dignosis, is the following matrix I
   used correct?
   0.25 0.25 0.25 0.25 -0.25 -0.25 -0.25 -0.25 0 0 0 0 0 0 0 0 0 0 0 0 0
   0 0 0 (I think it regressed out the effect of genotype and gender,
   that is it takes the genotype as a covariable)
 
   Or I should create another fsgd file, that has 4 classes: AF, AM, BF,
   BM. And I can use the matrix (0.5 0.5 -0.5 -0.5 0 0 0 0 0 0 0 0) to
   perform the main effect of diagnosis.
   Which one of two mentioned matrix is right?
   Thanks a lot.
   Best wishes
   Meng
 
 
 
 -- 
 Douglas N. Greve, Ph.D.
 MGH-NMR Center
 gr...@nmr.mgh.harvard.edu
 Phone Number: 617-724-2358
 Fax: 617-726-7422
 
 Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
 FileDrop: www.nmr.mgh.harvard.edu/facility/filedrop/index.html
 
 
 
 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.



-- 
Douglas N. Greve, Ph.D.
MGH-NMR Center
gr...@nmr.mgh.harvard.edu
Phone Number: 617-724-2358
Fax: 617-726-7422

Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
FileDrop: www.nmr.mgh.harvard.edu/facility/filedrop/index.html

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

[Freesurfer] contrast matrix

2012-09-06 Thread Meng Li
Hi Freesurfer experts,
When I perform the statistical analysis, I am very confused with the following 
questions:

My experimental design includes 3 discrete factors: diagnosis with two levels 
(A, B); genotype with two levels (G, T); gender (F, M), and two covariates.

So I can get 8 classes: AGF, AGM, ATF,ATM, BGF, BGM, BTF, BTM.

1)  I want to perform 2 (diagnosis)* 2(genotype) interaction analysis with 
regressing out the effect of gender and two covariates, but I don't know the 
rules for setting the contrasts for the interaction.  The contrast matrix I 
used is:

0.25 0.25 -0.25 -0.25 -0.25 -0.25 0.25 0.25 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

is it correct?

If it is correct, how to explain the results, for example, what does the 
positive (or negative) clusters stand for?  Or the clusters showed in the 
t-test statistical map are the regions that have the significant interaction?

 

 2) When I perform the main effect of dignosis, is the following matrix I used 
correct?

0.25 0.25 0.25 0.25 -0.25 -0.25 -0.25 -0.25 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0  (I 
think it regressed out the effect of genotype and gender, that is it takes the 
genotype as a covariable)

 Or I  should create another fsgd file, that has 4 classes: AF, AM, BF, BM. And 
I can use the matrix (0.5 0.5 -0.5 -0.5 0 0 0 0 0 0 0 0) to perform the main 
effect of diagnosis. which one is right?

 

Any help will be very appreciated.

 

Best wishes,

 

Meng 






___
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.


Re: [Freesurfer] contrast matrix

2012-09-06 Thread Douglas N Greve


On 09/06/2012 04:42 AM, Meng Li wrote:
 Hi Freesurfer experts,
 When I perform the statistical analysis, I am very confused with the 
 following questions:

 My experimental design includes 3 discrete factors: diagnosis with two 
 levels (A, B); genotype with two levels (G, T); gender (F, M), and two 
 covariates.

 So I can get 8 classes: AGF, AGM, ATF,ATM, BGF, BGM, BTF, BTM.

 1) I want to perform 2 (diagnosis)* 2(genotype) interaction analysis 
 with regressing out the effect of gender and two covariates, but I 
 don't know the rules for setting the contrasts for the interaction.  
 The contrast matrix I used is:

 0.250.25 -0.25-0.25 -0.25 -0.25 0.25 0.25 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

 is it correct?

 If it is correct, how to explain the results, for example, what does 
 the positive (or negative) clusters stand for?  Or the clusters showed 
 in the t-test statistical map are the regions that have the 
 significant interaction?

This is correct. As with all interactions, the sign is hard to 
interpret. Most people will do post hoc analyses to help interpret the 
results.

  2) When I perform the main effect of dignosis, is the following 
 matrix I used correct?

 0.25 0.25 0.25 0.25 -0.25 -0.25 -0.25 -0.25 0 0 0 0 0 0 0 0 0 0 0 0 0 
 0 0 0  (I think it regressed out the effect of genotype and gender, 
 that is it takes the genotype as a covariable)

 Or I  should create another fsgd file, that has 4 classes: AF, AM, BF, 
 BM. And I can use the matrix (0.5 0.5 -0.5 -0.5 0 0 0 0 0 0 0 0) to 
 perform the main effect of diagnosis. which one is right?

Your contrast is correct.
doug

 Any help will be very appreciated.

 Best wishes,

 Meng









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

-- 
Douglas N. Greve, Ph.D.
MGH-NMR Center
gr...@nmr.mgh.harvard.edu
Phone Number: 617-724-2358
Fax: 617-726-7422

Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
FileDrop: www.nmr.mgh.harvard.edu/facility/filedrop/index.html

___
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] contrast matrix

2012-08-29 Thread Meng Li
Hi Freesurfers,

My experimental design includes 3 discrete factors: diagnosis with two levels 
(A, B); genotype with two levels (G, T); gender (F, M)

So I can get 8 classes: AGF, AGM, ATF,ATM, BGF, BGM, BTF, BTM. Then I want to 
perform 2 (diagnosis)* 2(genotype) interaction analysis with regressing out the 
effect of gender, the contrast matrix is:

0.25  0.25  -0.25  -0.25  -0.25  -0.25  0.25  0.25 

so I can get the clusters that have significant interaction. When I perform the 
main effect of dignosis, is the following matrix used correct?

0.25 0.25 0.25 0.25 -0.25 -0.25 -0.25 -0.25 (I think it regressed out the 
effect of genotype and gender, that is take the genotype as a covariable)

 

Or I  should create another fsgd file, that has 4 classes: AF, AM, BF, BM. And 
I can use the matrix (0.5 0.5 -0.5 -0.5) to perform the main effect of 
diagnosis. Am I correct? 

Any help will be very appreciated.

 

Best wishes,

 

Meng Li

 ___
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.


Re: [Freesurfer] contrast matrix

2012-08-07 Thread Douglas N Greve
Hi Meng, in the case of a 2x2 interaction, the F test has only 1 dof in 
the numerator. This makes it the same as an unsigned t-test. The 
interaction in intercept is just the interaction regressing out gender 
and age (the first row of your matrix). The interaction in slope is the 
2x2xage interaction regressing out the effect of gender (the 2nd row).
doug

On 08/06/2012 10:28 PM, Meng Li wrote:
 Hi professor,
 I know that if performing the Analysis of Variance (eg. 2*2 
 interaction analysis), we should use the F-test, so I wonder the 
 reason why the contrast matrix of 4G0V 
 (http://surfer.nmr.mgh.harvard.edu/fswiki/Fsgdf4G0V) use the t-test.
 And if I want to know whether there is an interaction between 
 diagnosis and genotype regressing out the effect of gender and age (in 
 either intercept or slope ??) as previous emial mentioned, that is 
 using the F-test to detect the interaction, so whether I should use 
 the following matrix:
 0.25 0.25 -0.25 -0.25 -0.25 -0.25 0.25 0.25 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0.25 0.25 -0.25 -0.25 -0.25 -0.25 0.25 0.25
 Thanks,
 Best wishes,
 Meng
 Date: Mon, 06 Aug 2012 10:01:22 -0400
 From: Douglas N Greve gr...@nmr.mgh.harvard.edu
 Subject: Re: [Freesurfer] contrast matrix
 To: freesurfer@nmr.mgh.harvard.edu
 Hi Meng, the first row is what you want. The second row tests for an
 interaction between diagnosis, genotype, and age.
 doug
 On 08/04/2012 10:23 PM, Meng Li wrote:
  Hi Freesurfers,
 
  My experimental design includes 3 discrete factors and 1 continuous
  variables:
 
  Discrete factors: diagnosis with two levels (A, B); genotype with two
  levels (G, T); gender (F, M)
 
  Continuous variable: age
 
  So I can get 8 classes: AGF, AGM, ATF,ATM, BGF, BGM, BTF, BTM. Then I
  want to perform 2 (diagnosis)* 2(genotype) interaction analysis with
  regressing out the effect of gender and age. Is the following contrast
  matrix correct?
 
  0.25 0.25 -0.25 -0.25 -0.25 -0.25 0.25 0.25 0 0 0 0 0 0 0 0
 
  0 0 0 0 0 0 0 00.25 0.25 -0.25 -0.25 -0.25 -0.25 0.25 0.25
 
  Any help will be very appreciated.
 
  Best wishes,
 
  Meng
 
 




-- 
Douglas N. Greve, Ph.D.
MGH-NMR Center
gr...@nmr.mgh.harvard.edu
Phone Number: 617-724-2358
Fax: 617-726-7422

Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
FileDrop: www.nmr.mgh.harvard.edu/facility/filedrop/index.html

___
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.



Re: [Freesurfer] contrast matrix

2012-08-06 Thread Douglas N Greve
Hi Meng, the first row is what you want. The second row tests for an 
interaction between diagnosis, genotype, and age.
doug

On 08/04/2012 10:23 PM, Meng Li wrote:
 Hi Freesurfers,

 My experimental design includes 3 discrete factors and 1 continuous 
 variables:

 Discrete factors: diagnosis with two levels (A, B); genotype with two 
 levels (G, T); gender (F, M)

 Continuous variable: age

 So I can get 8 classes: AGF, AGM, ATF,ATM, BGF, BGM, BTF, BTM. Then I 
 want to perform 2 (diagnosis)* 2(genotype) interaction analysis with 
 regressing out the effect of gender and age. Is the following contrast 
 matrix correct?

 0.25 0.25 -0.25 -0.25 -0.25 -0.25 0.25 0.25 0 0 0 0 0 0 0 0

 0 0 0 0 0 0 0 00.25 0.25 -0.25 -0.25 -0.25 -0.25 0.25 0.25

 Any help will be very appreciated.

 Best wishes,

 Meng









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

-- 
Douglas N. Greve, Ph.D.
MGH-NMR Center
gr...@nmr.mgh.harvard.edu
Phone Number: 617-724-2358
Fax: 617-726-7422

Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
FileDrop: www.nmr.mgh.harvard.edu/facility/filedrop/index.html

___
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] contrast matrix

2012-08-04 Thread Meng Li
Hi Freesurfers,

My experimental design includes 3 discrete factors and 1 continuous variables:

Discrete factors: diagnosis with two levels (A, B); genotype with two levels 
(G, T); gender (F, M)

Continuous variable: age

So I can get 8 classes. Then I want to perform 2 (diagnosis)* 2(genotype) 
interaction analysis with regressing out the effect of gender and age. Is the 
following contrast matrix correct?

0.25  0.25  -0.25  -0.25  -0.25  -0.25  0.25  0.25  0  0  0  0  0  0  0  0

0  0  0  0  0  0  0  0  0.25  0.25  -0.25  -0.25  -0.25  -0.25  0.25  0.25

Any help will be very appreciated.

 

Best wishes,

 

Meng



___
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.


Re: [Freesurfer] contrast matrix for 2 discrete factors and 3 continuous variables

2011-01-18 Thread Douglas N Greve
Hi Jose, with 6 classes and 3 continuous variables, I think you should 
have 24 regressors, which means 24 columns in the contrast matrix. Yours 
only has 18. Otherwise the contrast to test between B and C is correct 
(just need to add 6 zeros). For the interaction, you would need

0 0 0.5 -0.5 -0.5 0.5 0 0 

doug

Jose Luis Cantero Lorente wrote:

 Dear Freesurfers,

  

 My experimental design includes 2 discrete factors and 3 continuous 
 variables:

  

 Discrete factors:

 -   Diagnosis with three levels (A, B, C)

 -   Gender with two levels (Males, Females)

  

 Continuous variables:

 -   Mean cortical thickness in the left hemisphere (CTLH)

 -   Age

 -   Performance in a memory test (TASK)

  

 The FSGD file would be as follows:

  

 GroupDescriptorFile 1

 Title Thickness-subj

 Class AMale

 Class AFemale

 Class BMale

 Class BFemale

 Class CMale

 Class CFemale

 variables ZCTLH ZAGE

 Input control_01 AMale -1.04398 0.24789

 Input control_02 AMale 1.22853 -0.72343

 Input control_03 AFemale .13773 -1.37097

 Input control_04 AFemale .41043 0.24789

 Input mci_01 BMale  -.77128 0.24789

 Input mci_02 BMale -2.40749 0.73354

 Input mci_03 BFemale -.86218 -1.0472

 Input mci_04 BFemale .50133 0.23777

 Input ad_01 CMale  -.75678 0.22789

 Input ad_02 CMale -2.88749 0.63047

 Input ad_03 CFemale -.96015 -1.4452

 Input ad_04 CFemale .80712 -0.37567 …

  

 We are assuming different offsets and different slopes (DDOS).

  

 The following contrast would test the null hypothesis whether there is 
 a difference between B and C (T-test) regressing out the effect of the 
 remaining variables.

  

 0 0 0.5 0.5 -0.5 -0.5 0 0 0 0 0 0 0 0 0 0 0 0

  

 Could you help me to build the contrast for testing interactions in 
 the above experimental design? In the FSwiki examples, you add one 
 column when you have two factors with two levels each, and one 
 continuous variable. I am not sure how many columns should I add in 
 our particular case and why.

  

 Null hypothesis: is there an interaction between diagnosis (B  C) and 
 gender regressing out the two remaining variables? Assuming that you 
 add one column per variable that is regressed out, the contrast would 
 be as follows:

  

 0 0 0.5 0.5 -0.5 -0.5 0 0 0 0 0 0 0 0 0 0 0 0 0 0

  

 Is this correct? Any help will be very appreciated.

  

 Many thanks in advance.

  

 Best regards,

 Jose


 ---
 Jose L. Cantero, Ph.D.
 Laboratory of Functional Neuroscience
 Department of Physiology, Anatomy and Cell Biology
 University Pablo de Olavide
 Ctra. de Utrera, Km.1
 41013 - Seville
 - Spain -
 Phone: +34 954 977433
 Fax: +34 954 349151
 Email: jlcan...@upo.es
 http://www.upo.es/neuroaging/en/
 

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

-- 
Douglas N. Greve, Ph.D.
MGH-NMR Center
gr...@nmr.mgh.harvard.edu
Phone Number: 617-724-2358 
Fax: 617-726-7422

Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
FileDrop: www.nmr.mgh.harvard.edu/facility/filedrop/index.html

___
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.



Re: [Freesurfer] contrast matrix for 2 discrete factors and 3 continuous variables

2011-01-18 Thread Jose Luis Cantero Lorente
Thanks Doug for your reply. I forgot that the number of columns is number of 
classes by number of covariates +1. 

So, I only want you to confirm me that the extra zero that I've seen in the 
FSwiki example is an erratum (see contrasts 7 and 8 in Four Groups (2 Factors, 
Two Levels), One Covariate. DODS only. QDEC-able) and that I don't have to add 
any extra zero per covariate when testing the interaction effect.

Many thanks again.
Jose

- Mensaje original -
De: Douglas N Greve gr...@nmr.mgh.harvard.edu
Fecha: Martes, 18 de Enero de 2011, 16:53
Asunto: Re: [Freesurfer] contrast matrix for 2 discrete factors and 3 
continuous variables
A: Jose Luis Cantero Lorente jlcan...@upo.es
CC: freesurfer@nmr.mgh.harvard.edu

 Hi Jose, with 6 classes and 3 continuous variables, I think you 
 should have 24 regressors, which means 24 columns in the 
 contrast matrix. Yours only has 18. Otherwise the contrast to 
 test between B and C is correct (just need to add 6 zeros). For 
 the interaction, you would need
 
 0 0 0.5 -0.5 -0.5 0.5 0 0 
 
 doug
 
 Jose Luis Cantero Lorente wrote:
 
 Dear Freesurfers,
 
  
 My experimental design includes 2 discrete factors and 3 
 continuous variables:
 
  
 Discrete factors:
 
 -   Diagnosis with three 
 levels (A, B, C)
 
 -   Gender with two levels 
 (Males, Females)
 
  
 Continuous variables:
 
 -   Mean cortical thickness 
 in the left hemisphere (CTLH)
 
 -   Age
 
 -   Performance in a memory 
 test (TASK)
 
  
 The FSGD file would be as follows:
 
  
 GroupDescriptorFile 1
 
 Title Thickness-subj
 
 Class AMale
 
 Class AFemale
 
 Class BMale
 
 Class BFemale
 
 Class CMale
 
 Class CFemale
 
 variables ZCTLH ZAGE
 
 Input control_01 AMale -1.04398 0.24789
 
 Input control_02 AMale 1.22853 -0.72343
 
 Input control_03 AFemale .13773 -1.37097
 
 Input control_04 AFemale .41043 0.24789
 
 Input mci_01 BMale  -.77128 0.24789
 
 Input mci_02 BMale -2.40749 0.73354
 
 Input mci_03 BFemale -.86218 -1.0472
 
 Input mci_04 BFemale .50133 0.23777
 
 Input ad_01 CMale  -.75678 0.22789
 
 Input ad_02 CMale -2.88749 0.63047
 
 Input ad_03 CFemale -.96015 -1.4452
 
 Input ad_04 CFemale .80712 -0.37567 …
 
  
 We are assuming different offsets and different slopes (DDOS).
 
  
 The following contrast would test the null hypothesis whether 
 there is a difference between B and C (T-test) regressing out 
 the effect of the remaining variables.
 
  
 0 0 0.5 0.5 -0.5 -0.5 0 0 0 0 0 0 0 0 0 0 0 0
 
  
 Could you help me to build the contrast for testing 
 interactions in the above experimental design? In the FSwiki 
 examples, you add one column when you have two factors with two 
 levels each, and one continuous variable. I am not sure how many 
 columns should I add in our particular case and why.
 
  
 Null hypothesis: is there an interaction between diagnosis (B  
 C) and gender regressing out the two remaining variables? 
 Assuming that you add one column per variable that is regressed 
 out, the contrast would be as follows:
 
  
 0 0 0.5 0.5 -0.5 -0.5 0 0 0 0 0 0 0 0 0 0 0 0 0 0
 
  
 Is this correct? Any help will be very appreciated.
 
  
 Many thanks in advance.
 
  
 Best regards,
 
 Jose
 
 
 ---
 Jose L. Cantero, Ph.D.
 Laboratory of Functional Neuroscience
 Department of Physiology, Anatomy and Cell Biology
 University Pablo de Olavide
 Ctra. de Utrera, Km.1
 41013 - Seville
 - Spain -
 Phone: +34 954 977433
 Fax: +34 954 349151
 Email: jlcan...@upo.es
 http://www.upo.es/neuroaging/en/
 
 
 
 ___
 Freesurfer mailing list
 Freesurfer@nmr.mgh.harvard.edu
 https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
 
 -- 
 Douglas N. Greve, Ph.D.
 MGH-NMR Center
 gr...@nmr.mgh.harvard.edu
 Phone Number: 617-724-2358 Fax: 617-726-7422
 
 Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
 FileDrop: www.nmr.mgh.harvard.edu/facility/filedrop/index.html
 
 
 
 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.
 

---
Jose L. Cantero, Ph.D.
Laboratory of Functional Neuroscience
Department of Physiology, Anatomy and Cell Biology
University Pablo de Olavide
Ctra. de Utrera, Km.1
41013 - Seville
- Spain -
Phone: +34 954 977433
Fax: +34 954 349151
Email: jlcan...@upo.es
http://www.upo.es/neuroaging/es/


___
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

Re: [Freesurfer] contrast matrix for 2 discrete factors and 3 continuous variables

2011-01-18 Thread Douglas N Greve
yep, those are typos. I just fixed them. thanks
doug

Jose Luis Cantero Lorente wrote:
 Thanks Doug for your reply. I forgot that the number of columns is 
 number of classes by number of covariates +1.

 So, I only want you to confirm me that the extra zero that I've seen 
 in the FSwiki example is an erratum (see contrasts 7 and 8 in Four 
 Groups (2 Factors, Two Levels), One Covariate. DODS only. QDEC-able 
 http://surfer.nmr.mgh.harvard.edu/fswiki/Fsgdf4G1V) and that I don't 
 have to add any extra zero per covariate when testing the interaction 
 effect.

 Many thanks again.
 Jose

 - Mensaje original -
 De: Douglas N Greve gr...@nmr.mgh.harvard.edu
 Fecha: Martes, 18 de Enero de 2011, 16:53
 Asunto: Re: [Freesurfer] contrast matrix for 2 discrete factors and 3 
 continuous variables
 A: Jose Luis Cantero Lorente jlcan...@upo.es
 CC: freesurfer@nmr.mgh.harvard.edu

  Hi Jose, with 6 classes and 3 continuous variables, I think you
  should have 24 regressors, which means 24 columns in the
  contrast matrix. Yours only has 18. Otherwise the contrast to
  test between B and C is correct (just need to add 6 zeros). For
  the interaction, you would need
 
  0 0 0.5 -0.5 -0.5 0.5 0 0 
 
  doug
 
  Jose Luis Cantero Lorente wrote:
  
  Dear Freesurfers,
  
  
  My experimental design includes 2 discrete factors and 3
  continuous variables:
  
  
  Discrete factors:
  
  -   Diagnosis with three
  levels (A, B, C)
  
  -   Gender with two levels
  (Males, Females)
  
  
  Continuous variables:
  
  -   Mean cortical thickness
  in the left hemisphere (CTLH)
  
  -   Age
  
  -   Performance in a memory
  test (TASK)
  
  
  The FSGD file would be as follows:
  
  
  GroupDescriptorFile 1
  
  Title Thickness-subj
  
  Class AMale
  
  Class AFemale
  
  Class BMale
  
  Class BFemale
  
  Class CMale
  
  Class CFemale
  
  variables ZCTLH ZAGE
  
  Input control_01 AMale -1.04398 0.24789
  
  Input control_02 AMale 1.22853 -0.72343
  
  Input control_03 AFemale .13773 -1.37097
  
  Input control_04 AFemale .41043 0.24789
  
  Input mci_01 BMale  -.77128 0.24789
  
  Input mci_02 BMale -2.40749 0.73354
  
  Input mci_03 BFemale -.86218 -1.0472
  
  Input mci_04 BFemale .50133 0.23777
  
  Input ad_01 CMale  -.75678 0.22789
  
  Input ad_02 CMale -2.88749 0.63047
  
  Input ad_03 CFemale -.96015 -1.4452
  
  Input ad_04 CFemale .80712 -0.37567 …
  
  
  We are assuming different offsets and different slopes (DDOS).
  
  
  The following contrast would test the null hypothesis whether
  there is a difference between B and C (T-test) regressing out
  the effect of the remaining variables.
  
  
  0 0 0.5 0.5 -0.5 -0.5 0 0 0 0 0 0 0 0 0 0 0 0
  
  
  Could you help me to build the contrast for testing
  interactions in the above experimental design? In the FSwiki
  examples, you add one column when you have two factors with two
  levels each, and one continuous variable. I am not sure how many
  columns should I add in our particular case and why.
  
  
  Null hypothesis: is there an interaction between diagnosis (B 
  C) and gender regressing out the two remaining variables?
  Assuming that you add one column per variable that is regressed
  out, the contrast would be as follows:
  
  
  0 0 0.5 0.5 -0.5 -0.5 0 0 0 0 0 0 0 0 0 0 0 0 0 0
  
  
  Is this correct? Any help will be very appreciated.
  
  
  Many thanks in advance.
  
  
  Best regards,
  
  Jose
  
  
  ---
  Jose L. Cantero, Ph.D.
  Laboratory of Functional Neuroscience
  Department of Physiology, Anatomy and Cell Biology
  University Pablo de Olavide
  Ctra. de Utrera, Km.1
  41013 - Seville
  - Spain -
  Phone: +34 954 977433
  Fax: +34 954 349151
  Email: jlcan...@upo.es
  http://www.upo.es/neuroaging/en/
  
  
  
  ___
  Freesurfer mailing list
  Freesurfer@nmr.mgh.harvard.edu
  https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
 
  --
  Douglas N. Greve, Ph.D.
  MGH-NMR Center
  gr...@nmr.mgh.harvard.edu
  Phone Number: 617-724-2358 Fax: 617-726-7422
 
  Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
  FileDrop: www.nmr.mgh.harvard.edu/facility/filedrop/index.html
 
 
 
  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.
 

 ---
 Jose L. Cantero, Ph.D.
 Laboratory of Functional Neuroscience
 Department of Physiology, Anatomy and Cell Biology
 University Pablo de Olavide
 Ctra. de Utrera, Km.1
 41013 - Seville
 - Spain -
 Phone: +34 954 977433
 Fax: +34 954 349151
 Email: jlcan...@upo.es
 http

[Freesurfer] contrast matrix for 2 discrete factors and 3 continuous variables

2011-01-17 Thread Jose Luis Cantero Lorente
  -!--  /* Font Definitions */ @font-face  {font-family:Courier 
New; panose-1:2 7 3 9 2 2 5 2 4 4;   mso-font-charset:0; 
mso-generic-font-family:auto;   mso-font-pitch:variable;
mso-font-signature:3 0 0 0 1 0;} @font-face {font-family:Wingdings; 
panose-1:5 2 1 2 1 8 4 8 7 8;   mso-font-charset:2; 
mso-generic-font-family:auto;   mso-font-pitch:variable;
mso-font-signature:0 0 65536 0 -2147483648 0;} @font-face   
{font-family:Cambria;   panose-1:2 4 5 3 5 4 6 3 2 4;   mso-font-charset:0; 
mso-generic-font-family:auto;   mso-font-pitch:variable;
mso-font-signature:3 0 0 0 1 0;}  /* Style Definitions */ p.MsoNormal, 
li.MsoNormal, div.MsoNormal  {mso-style-parent:;   margin:0cm; 
margin-bottom:.0001pt;  mso-pagination:widow-orphan;font-size:12.0pt;   
font-family:Times New Roman;  mso-ascii-font-family:Cambria;  
mso-ascii-theme-font:minor-latin;   mso-fareast-font-family:Cambria;
mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Cambria;  
mso-hansi-theme-font:minor-latin;   mso-bidi-font-family:Times New Roman; 
mso-bidi-theme-font:minor-bidi; mso-ansi-language:EN-US;
mso-fareast-language:EN-US;} p.MsoListParagraph, li.MsoListParagraph, 
div.MsoListParagraph  {margin-top:0cm;margin-right:0cm;   
margin-bottom:0cm;  margin-left:36.0pt; margin-bottom:.0001pt;  
mso-add-space:auto; mso-pagination:widow-orphan;font-size:12.0pt;   
font-family:Times New Roman;  mso-ascii-font-family:Cambria;  
mso-ascii-theme-font:minor-latin;   mso-fareast-font-family:Cambria;
mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Cambria;  
mso-hansi-theme-font:minor-latin;   mso-bidi-font-family:Times New Roman; 
mso-bidi-theme-font:minor-bidi; mso-ansi-language:EN-US;
mso-fareast-language:EN-US;} p.MsoListParagraphCxSpFirst, 
li.MsoListParagraphCxSpFirst, div.MsoListParagraphCxSpFirst   
{mso-style-type:export-only;margin-top:0cm; margin-right:0cm;   
margin-bottom:0cm;  margin-left:36.0pt; margin-bottom:.0001pt;  
mso-add-space:auto; mso-pagination:widow-orphan;font-size:12.0pt;   
font-family:Times New Roman;  mso-ascii-font-family:Cambria;  
mso-ascii-theme-font:minor-latin;   mso-fareast-font-family:Cambria;
mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Cambria;  
mso-hansi-theme-font:minor-latin;   mso-bidi-font-family:Times New Roman; 
mso-bidi-theme-font:minor-bidi; mso-ansi-language:EN-US;
mso-fareast-language:EN-US;} p.MsoListParagraphCxSpMiddle, 
li.MsoListParagraphCxSpMiddle, div.MsoListParagraphCxSpMiddle
{mso-style-type:export-only;margin-top:0cm; margin-right:0cm;   
margin-bottom:0cm;  margin-left:36.0pt; margin-bottom:.0001pt;  
mso-add-space:auto; mso-pagination:widow-orphan;font-size:12.0pt;   
font-family:Times New Roman;  mso-ascii-font-family:Cambria;  
mso-ascii-theme-font:minor-latin;   mso-fareast-font-family:Cambria;
mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Cambria;  
mso-hansi-theme-font:minor-latin;   mso-bidi-font-family:Times New Roman; 
mso-bidi-theme-font:minor-bidi; mso-ansi-language:EN-US;
mso-fareast-language:EN-US;} p.MsoListParagraphCxSpLast, 
li.MsoListParagraphCxSpLast, div.MsoListParagraphCxSpLast  
{mso-style-type:export-only;margin-top:0cm; margin-right:0cm;   
margin-bottom:0cm;  margin-left:36.0pt; margin-bottom:.0001pt;  
mso-add-space:auto; mso-pagination:widow-orphan;font-size:12.0pt;   
font-family:Times New Roman;  mso-ascii-font-family:Cambria;  
mso-ascii-theme-font:minor-latin;   mso-fareast-font-family:Cambria;
mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Cambria;  
mso-hansi-theme-font:minor-latin;   mso-bidi-font-family:Times New Roman; 
mso-bidi-theme-font:minor-bidi; mso-ansi-language:EN-US;
mso-fareast-language:EN-US;} @page Section1 {size:612.0pt 792.0pt;  
margin:70.85pt 3.0cm 70.85pt 3.0cm; mso-header-margin:36.0pt;   
mso-footer-margin:36.0pt;   mso-paper-source:0;} div.Section1   
{page:Section1;}  /* List Definitions */ @list l0   
{mso-list-id:1521627843;mso-list-type:hybrid;   
mso-list-template-ids:2118037184 -221210386 67764227 67764229 67764225 67764227 
67764229 67764225 67764227 67764229;} @list l0:level1   {mso-level-start-at:0;  
mso-level-number-format:bullet; mso-level-text:-;   
mso-level-tab-stop:none;mso-level-number-position:left; 
margin-left:23.0pt; text-indent:-18.0pt;font-family:Cambria;
mso-fareast-font-family:Cambria;mso-fareast-theme-font:minor-latin; 
mso-bidi-font-family:Times New Roman; 
mso-bidi-theme-font:minor-bidi;} ol 

[Freesurfer] contrast matrix of 2 factors (2x4 groups)

2009-10-06 Thread Stefan Brauns
Hi all,
I am trying to examine the interaction of 2 factors (2 x 4 groups) and have
difficulties to find the right contrast matrix for mri_glmfit.

We have patients and controls at four different aquisition sites and want to
know if the changes (i.e. thickness) between patients and controls are equal
in every site.

so we have 8 groups:

patientssite1
patientssite2
patientssite3
patientssite4
controlssite1
controlssite2
controlssite3
controlssite4

the contrast for differences between patients and controls (T-Test) would
be:

1/4 1/4 1/4 1/4 -1/4 -1/4 -1/4 -1/4

the contrast to investigate if the observed measured value is equal in all
sites (F-Test) would be:

1/2 -1/2  001/2 -1/2  0 0
0 1/2 -1/2 00 1/2 -1/2  0
0 01/2 -1/2 0  01/2 -1/2

How would the contrast matrix look like if I want to test if there is an
overall interaction between site and diagnosis, i.e. does the effect of
diagnosis vary by site (F-Test)?

Many thanks,
Stefan

-- 
Stefan Brauns
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

Re: [Freesurfer] contrast matrix of 2 factors (2x4 groups)

2009-10-06 Thread Douglas N Greve
It would be the same as your 2nd matrix with the right four columns negated.

doug

Stefan Brauns wrote:
 Hi all,

 I am trying to examine the interaction of 2 factors (2 x 4 groups) 
 and have difficulties to find the right contrast matrix for mri_glmfit.

 We have patients and controls at four different aquisition sites and 
 want to know if the changes (i.e. thickness) between patients and 
 controls are equal in every site.

 so we have 8 groups:

 patientssite1
 patientssite2
 patientssite3
 patientssite4
 controlssite1
 controlssite2
 controlssite3
 controlssite4

 the contrast for differences between patients and controls (T-Test) 
 would be:

 1/4 1/4 1/4 1/4 -1/4 -1/4 -1/4 -1/4 

 the contrast to investigate if the observed measured value is equal in 
 all sites (F-Test) would be:

 1/2 -1/2  001/2 -1/2  0 0 
 0 1/2 -1/2 00 1/2 -1/2  0
 0 01/2 -1/2 0  01/2 -1/2 

 How would the contrast matrix look like if I want to test if there is 
 an overall interaction between site and diagnosis, i.e. does the 
 effect of diagnosis vary by site (F-Test)?

 Many thanks,
 Stefan

 -- 
 Stefan Brauns

 

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

-- 
Douglas N. Greve, Ph.D.
MGH-NMR Center
gr...@nmr.mgh.harvard.edu
Phone Number: 617-724-2358 
Fax: 617-726-7422

In order to help us help you, please follow the steps in:
surfer.nmr.mgh.harvard.edu/fswiki/BugReporting


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


[Freesurfer] contrast matrix question

2009-08-05 Thread Victoria Williams
Hello,

I apologize if this is a very simple question, but how would you set up a 
contrast matrix to look at the interaction of 2 variables on a measure? 
For example, my fsgd file contains:

class=1
variables=2
Input Subjid class var1 var2

When I tried using a contrast of 0_1_1 the significance map looks very 
similar to the glm run only containing var1 (contrast_0_1). I thought 
0_1_1 was correct, but now I'm not so sure and would like to double check. 
What I am interested in is how the interaction of var1 and var2 is 
correlated with the brain measure per voxel. Is this possible with 
mri_glmfit?

I've checked the tutorials and scoured the internet as not to ask any
silly questions, but I'm having trouble finding anything helpful.

Thanks in advance!
Tori
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


Re: [Freesurfer] contrast matrix question

2009-08-05 Thread Douglas N Greve
0 1 1 will just be the mean of the slopes of var1 and var2. Looks like 
you want 0 1 -1 to look for the interaction.

doug

Victoria Williams wrote:
 Hello,

 I apologize if this is a very simple question, but how would you set up a 
 contrast matrix to look at the interaction of 2 variables on a measure? 
 For example, my fsgd file contains:

 class=1
 variables=2
 Input Subjid class var1 var2

 When I tried using a contrast of 0_1_1 the significance map looks very 
 similar to the glm run only containing var1 (contrast_0_1). I thought 
 0_1_1 was correct, but now I'm not so sure and would like to double check. 
 What I am interested in is how the interaction of var1 and var2 is 
 correlated with the brain measure per voxel. Is this possible with 
 mri_glmfit?

 I've checked the tutorials and scoured the internet as not to ask any
 silly questions, but I'm having trouble finding anything helpful.

 Thanks in advance!
 Tori
 ___
 Freesurfer mailing list
 Freesurfer@nmr.mgh.harvard.edu
 https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


   

-- 
Douglas N. Greve, Ph.D.
MGH-NMR Center
gr...@nmr.mgh.harvard.edu
Phone Number: 617-724-2358 
Fax: 617-726-7422

In order to help us help you, please follow the steps in:
surfer.nmr.mgh.harvard.edu/fswiki/BugReporting


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


Re: [Freesurfer] contrast matrix question

2009-08-05 Thread Michael Harms

Hi Tori,
There is no way to investigate the interaction of two continuous effects
with the contrast vector alone, if the design matrix itself only
involves main effect terms.  The interaction itself needs to be coded
into the design matrix.

Note that it can become tricky as to the proper coefficients to use for
the contrast vector when you have both main effect and interaction terms
in your design matrix.  (There are in fact different types of
statistics that can be estimated, and you want your contrast vector to
be an estimable function.  Sophisticated statistical packages check
that this estimability constraint is satisfied, but I suspect that
mri_glmfit does not).

e.g.,
http://support.sas.com/onlinedoc/913/docMainpage.jsp

cheers,
Mike H.


On Wed, 2009-08-05 at 15:48 -0400, Victoria Williams wrote:
 Hello,
 
 I apologize if this is a very simple question, but how would you set up a 
 contrast matrix to look at the interaction of 2 variables on a measure? 
 For example, my fsgd file contains:
 
 class=1
 variables=2
 Input Subjid class var1 var2
 
 When I tried using a contrast of 0_1_1 the significance map looks very 
 similar to the glm run only containing var1 (contrast_0_1). I thought 
 0_1_1 was correct, but now I'm not so sure and would like to double check. 
 What I am interested in is how the interaction of var1 and var2 is 
 correlated with the brain measure per voxel. Is this possible with 
 mri_glmfit?
 
 I've checked the tutorials and scoured the internet as not to ask any
 silly questions, but I'm having trouble finding anything helpful.
 
 Thanks in advance!
 Tori
 ___
 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


Re: [Freesurfer] contrast matrix question

2009-08-05 Thread Douglas N Greve
Oops, Mike is right, disregard my previous email.

doug

Michael Harms wrote:
 Hi Tori,
 There is no way to investigate the interaction of two continuous effects
 with the contrast vector alone, if the design matrix itself only
 involves main effect terms.  The interaction itself needs to be coded
 into the design matrix.

 Note that it can become tricky as to the proper coefficients to use for
 the contrast vector when you have both main effect and interaction terms
 in your design matrix.  (There are in fact different types of
 statistics that can be estimated, and you want your contrast vector to
 be an estimable function.  Sophisticated statistical packages check
 that this estimability constraint is satisfied, but I suspect that
 mri_glmfit does not).

 e.g.,
 http://support.sas.com/onlinedoc/913/docMainpage.jsp

 cheers,
 Mike H.


 On Wed, 2009-08-05 at 15:48 -0400, Victoria Williams wrote:
   
 Hello,

 I apologize if this is a very simple question, but how would you set up a 
 contrast matrix to look at the interaction of 2 variables on a measure? 
 For example, my fsgd file contains:

 class=1
 variables=2
 Input Subjid class var1 var2

 When I tried using a contrast of 0_1_1 the significance map looks very 
 similar to the glm run only containing var1 (contrast_0_1). I thought 
 0_1_1 was correct, but now I'm not so sure and would like to double check. 
 What I am interested in is how the interaction of var1 and var2 is 
 correlated with the brain measure per voxel. Is this possible with 
 mri_glmfit?

 I've checked the tutorials and scoured the internet as not to ask any
 silly questions, but I'm having trouble finding anything helpful.

 Thanks in advance!
 Tori
 ___
 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


   

-- 
Douglas N. Greve, Ph.D.
MGH-NMR Center
gr...@nmr.mgh.harvard.edu
Phone Number: 617-724-2358 
Fax: 617-726-7422

In order to help us help you, please follow the steps in:
surfer.nmr.mgh.harvard.edu/fswiki/BugReporting


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


Re: [Freesurfer] contrast matrix question

2009-08-05 Thread Michael Harms

Just to clarify what exactly do you mean by interaction?
(interaction is a somewhat nebulous term, as indicated by Doug's and
mine differing responses).

If you want to look for a difference in slopes of two main continuous
effects, then a contrast vector can indeed be set up to handle that (as
noted by Doug).

If by interaction you mean the product of two continuous main effects,
then that needs to be coded into the design matrix, and the caveats that
I mentioned become applicable.

cheers,
Mike H.


On Wed, 2009-08-05 at 15:10 -0500, Michael Harms wrote:
 Hi Tori,
 There is no way to investigate the interaction of two continuous effects
 with the contrast vector alone, if the design matrix itself only
 involves main effect terms.  The interaction itself needs to be coded
 into the design matrix.
 
 Note that it can become tricky as to the proper coefficients to use for
 the contrast vector when you have both main effect and interaction terms
 in your design matrix.  (There are in fact different types of
 statistics that can be estimated, and you want your contrast vector to
 be an estimable function.  Sophisticated statistical packages check
 that this estimability constraint is satisfied, but I suspect that
 mri_glmfit does not).
 
 e.g.,
 http://support.sas.com/onlinedoc/913/docMainpage.jsp
 
 cheers,
 Mike H.
 
 
 On Wed, 2009-08-05 at 15:48 -0400, Victoria Williams wrote:
  Hello,
  
  I apologize if this is a very simple question, but how would you set up a 
  contrast matrix to look at the interaction of 2 variables on a measure? 
  For example, my fsgd file contains:
  
  class=1
  variables=2
  Input Subjid class var1 var2
  
  When I tried using a contrast of 0_1_1 the significance map looks very 
  similar to the glm run only containing var1 (contrast_0_1). I thought 
  0_1_1 was correct, but now I'm not so sure and would like to double check. 
  What I am interested in is how the interaction of var1 and var2 is 
  correlated with the brain measure per voxel. Is this possible with 
  mri_glmfit?
  
  I've checked the tutorials and scoured the internet as not to ask any
  silly questions, but I'm having trouble finding anything helpful.
  
  Thanks in advance!
  Tori
  ___
  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


Re: [Freesurfer] contrast matrix

2009-07-09 Thread Feng-Xian
Hi,
  I think that I know what you mean. So, if I want to get the result with A 
 B  C, I should get A  B and B  C, respectively. And then, to combine 
these two results.

Would you tell me detail with step by step and what command I should type 
and how to type ? Or, have some reference to follow or to consult?

Thank you in advance!!

Feng-Xian


On Wed, 08 Jul 2009 15:28:44 -0400, Douglas N Greve wrote
 You can't do that with a contrast matrix. In general, you can't test 
 ANDs with a contrast, you have to test ORs. For AND, you have to 
 use a conjunction in which you make two contrasts A  B and B  C, 
 threshold both (mri_binarize), then do a logical AND.
 
 doug
 
 Feng-Xian wrote:
  Hi, 
I want to analysis three independence groups. And, I want to display a 
  result of A group  B group  C group with positive(red) and A group  B 
  group  C group with negative(blue). To show that, how do I write the 
number 
  of columns in the contrast matrix? 
 
  Thank you in advance!
 
  Feng-Xian
 
 
 
  -
  Chang Gung University Mail Server Web Mail system
  By Chang-Gung University Information Center
  (http://www.cgu.edu.tw/ic/)
 
  ___
  Freesurfer mailing list
  Freesurfer@nmr.mgh.harvard.edu
  https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
 
 
 
 
 -- 
 Douglas N. Greve, Ph.D.
 MGH-NMR Center
 gr...@nmr.mgh.harvard.edu
 Phone Number: 617-724-2358 
 Fax: 617-726-7422
 
 In order to help us help you, please follow the steps in:
 surfer.nmr.mgh.harvard.edu/fswiki/BugReporting


-
Chang Gung University Mail Server Web Mail system
By Chang-Gung University Information Center
(http://www.cgu.edu.tw/ic/)

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


[Freesurfer] contrast matrix

2009-07-08 Thread Feng-Xian


Hi, 
  I want to analysis three independence groups. And, I want to display a 
result of A group  B group  C group with positive(red) and A group  B 
group  C group with negative(blue). To show that, how do I write the number 
of columns in the contrast matrix? 

Thank you in advance!

Feng-Xian



-
Chang Gung University Mail Server Web Mail system
By Chang-Gung University Information Center
(http://www.cgu.edu.tw/ic/)

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


Re: [Freesurfer] contrast matrix

2009-07-08 Thread Douglas N Greve
You can't do that with a contrast matrix. In general, you can't test 
ANDs with a contrast, you have to test ORs. For AND, you have to use 
a conjunction in which you make two contrasts A  B and B  C, threshold 
both (mri_binarize), then do a logical AND.


doug

Feng-Xian wrote:
Hi, 
  I want to analysis three independence groups. And, I want to display a 
result of A group  B group  C group with positive(red) and A group  B 
group  C group with negative(blue). To show that, how do I write the number 
of columns in the contrast matrix? 


Thank you in advance!

Feng-Xian



-
Chang Gung University Mail Server Web Mail system
By Chang-Gung University Information Center
(http://www.cgu.edu.tw/ic/)

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


  


--
Douglas N. Greve, Ph.D.
MGH-NMR Center
gr...@nmr.mgh.harvard.edu
Phone Number: 617-724-2358 
Fax: 617-726-7422


In order to help us help you, please follow the steps in:
surfer.nmr.mgh.harvard.edu/fswiki/BugReporting


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