Hi, so i changed my design matrix, let the gender*group(AD,Contrrol), so this 
time the design matrix is like this, which i think it is ok



AgeSubjects  Female*AD  Male*AD  Female*Control  Male*Control

+74.30000 +0.00000 +0.00000 +0.00000 +1.00000
+73.70000 +0.00000 +0.00000 +0.00000 +1.00000
+84.50000 +0.00000 +0.00000 +1.00000 +0.00000
+78.50000 +0.00000 +0.00000 +1.00000 +0.00000
+80.80000 +0.00000 +0.00000 +0.00000 +1.00000
+65.40000 +0.00000 +0.00000 +0.00000 +1.00000
+73.10000 +0.00000 +0.00000 +1.00000 +0.00000
+72.60000 +0.00000 +0.00000 +1.00000 +0.00000
+63.20000 +0.00000 +0.00000 +0.00000 +1.00000
+71.70000 +0.00000 +0.00000 +0.00000 +1.00000
+77.70000 +0.00000 +0.00000 +1.00000 +0.00000
+76.90000 +0.00000 +0.00000 +0.00000 +1.00000
+73.20000 +0.00000 +0.00000 +0.00000 +1.00000
+76.20000 +0.00000 +0.00000 +0.00000 +1.00000
+84.70000 +0.00000 +0.00000 +0.00000 +1.00000
+69.60000 +0.00000 +0.00000 +1.00000 +0.00000
+70.10000 +0.00000 +0.00000 +0.00000 +1.00000
+70.90000 +0.00000 +0.00000 +1.00000 +0.00000
+77.00000 +0.00000 +0.00000 +1.00000 +0.00000
+74.50000 +0.00000 +0.00000 +0.00000 +1.00000
+74.40000 +0.00000 +0.00000 +1.00000 +0.00000
+72.90000 +0.00000 +0.00000 +0.00000 +1.00000
+74.00000 +0.00000 +0.00000 +0.00000 +1.00000
+70.60000 +0.00000 +0.00000 +0.00000 +1.00000
+78.20000 +0.00000 +0.00000 +0.00000 +1.00000
+70.60000 +0.00000 +0.00000 +0.00000 +1.00000
+80.30000 +0.00000 +0.00000 +1.00000 +0.00000
+65.10000 +0.00000 +0.00000 +0.00000 +1.00000
+69.80000 +0.00000 +0.00000 +0.00000 +1.00000
+71.10000 +0.00000 +0.00000 +0.00000 +1.00000
+81.30000 +0.00000 +1.00000 +0.00000 +0.00000
+75.40000 +0.00000 +1.00000 +0.00000 +0.00000
+73.90000 +1.00000 +0.00000 +0.00000 +0.00000
+64.10000 +0.00000 +1.00000 +0.00000 +0.00000
+80.10000 +0.00000 +1.00000 +0.00000 +0.00000
+78.30000 +0.00000 +1.00000 +0.00000 +0.00000
+73.20000 +0.00000 +1.00000 +0.00000 +0.00000
+75.30000 +1.00000 +0.00000 +0.00000 +0.00000
+65.60000 +0.00000 +1.00000 +0.00000 +0.00000
+62.40000 +0.00000 +1.00000 +0.00000 +0.00000
+77.20000 +1.00000 +0.00000 +0.00000 +0.00000
+70.70000 +1.00000 +0.00000 +0.00000 +0.00000
+70.10000 +1.00000 +0.00000 +0.00000 +0.00000
+82.60000 +1.00000 +0.00000 +0.00000 +0.00000
+80.20000 +1.00000 +0.00000 +0.00000 +0.00000
+65.90000 +1.00000 +0.00000 +0.00000 +0.00000
+59.70000 +1.00000 +0.00000 +0.00000 +0.00000
+71.80000 +0.00000 +1.00000 +0.00000 +0.00000
+72.40000 +1.00000 +0.00000 +0.00000 +0.00000
+80.50000 +1.00000 +0.00000 +0.00000 +0.00000
+62.90000 +0.00000 +1.00000 +0.00000 +0.00000
+67.40000 +0.00000 +1.00000 +0.00000 +0.00000
+80.20000 +1.00000 +0.00000 +0.00000 +0.00000
+85.50000 +0.00000 +1.00000 +0.00000 +0.00000
+65.90000 +0.00000 +1.00000 +0.00000 +0.00000
+89.10000 +1.00000 +0.00000 +0.00000 +0.00000
+56.40000 +0.00000 +1.00000 +0.00000 +0.00000
+82.70000 +0.00000 +1.00000 +0.00000 +0.00000
+68.30000 +0.00000 +1.00000 +0.00000 +0.00000
+74.00000 +0.00000 +1.00000 +0.00000 +0.00000



But when i design the Contrast.mat, I got some error,


ERROR: loading C Contrast_5_intersect.mat


I defined my contrast like this:

0 1 1 -1 -1

or

1 0 1 1 -1 -1

or

0 1 1 -1 -1 0


neither of them work..


Thank you for your patience:)


________________________________
De : freesurfer-boun...@nmr.mgh.harvard.edu 
<freesurfer-boun...@nmr.mgh.harvard.edu> de la part de Hao wen 
<hao.freesur...@hotmail.com>
Envoyé : mercredi 8 juin 2016 10:19:02
À : freesurfer@nmr.mgh.harvard.edu
Objet : Re: [Freesurfer] CM_Group_analysis_Create tha contrast and design 
matrix by myself


Also, as far as I know, in Surfstat, we can treat the categorized factor as the 
covirates, but in FS, the categorized factor should be treated as a class? is 
that because of this?

________________________________
De : freesurfer-boun...@nmr.mgh.harvard.edu 
<freesurfer-boun...@nmr.mgh.harvard.edu> de la part de Hao wen 
<hao.freesur...@hotmail.com>
Envoyé : mercredi 8 juin 2016 10:10:52
À : freesurfer@nmr.mgh.harvard.edu
Objet : Re: [Freesurfer] CM_Group_analysis_Create tha contrast and design 
matrix by myself


Ok, So in FS, you can not define your design matrix like this? cuz in Surfstat, 
i can define the design matrix like this, the five columns represent AD, 
Control, Age, female and male, because in FS, I know we can do the DODS & DOSS, 
but I want to design some more flexible design matrix, and for the Contrast 
wiht .mat file, what do you mean:


--C contrast1.mat <--C contrast2.mat ...>
Specify one or more contrasts to test. The contrast.mat file is an ASCII text 
file with the contrast matrix in it (make sure the last line is blank). The 
output will be saved in glmdir/contrast1, glmdir/contrast2, etc. Eg, if --C 
norm-v-cont.mat, then the ouput will be glmdir/norm-v-cont.


Hope to hear from you soon:)

________________________________
De : freesurfer-boun...@nmr.mgh.harvard.edu 
<freesurfer-boun...@nmr.mgh.harvard.edu> de la part de Douglas Greve 
<gr...@nmr.mgh.harvard.edu>
Envoyé : mardi 7 juin 2016 16:39:45
À : freesurfer@nmr.mgh.harvard.edu
Objet : Re: [Freesurfer] CM_Group_analysis_Create tha contrast and design 
matrix by myself

Columns (1+2) = Columns (4+5) in the desgin matrix. This causes the error

On 6/7/16 5:56 AM, Hao wen wrote:

Thanks, Doug:

That was a really silly mistake, so right now I can run the cmdline for 
mri_glmfit

but I got the error like this:


ERROR: matrix is ill-conditioned or badly scaled, condno = 1.07053e+07
--------------------------------
Possible problem with experimental design:
Check for duplicate entries and/or lack of range of
continuous variables within a class.


1,here is my cmdline:


mris_preproc --fsgd AD_CN_COVARIATES_AGE_GENDER.fsgd \
  --cache-in thickness.fwhm15.fsaverage \
  --target fsaverage \
  --hemi lh \
  --out lh.AD_CN_COVARIATES_AGE_GENDER_thickness_15.mgh

mri_glmfit --glmdir lh.AD_CN_COVARIAETS_AGE_GENDER.glmdir\
  --y lh.AD_CN_COVARIATES_AGE_GENDER_thickness_15.mgh \
  --C contrast.mat \
  --X X.mat\
  --surf fsaverage lh \
  --cortex \

So after this, I got my design matrix as below:

+0.00000 +1.00000 +74.30000 +0.00000 +1.00000
+0.00000 +1.00000 +73.70000 +0.00000 +1.00000
+0.00000 +1.00000 +84.50000 +1.00000 +0.00000
+0.00000 +1.00000 +78.50000 +1.00000 +0.00000
+0.00000 +1.00000 +80.80000 +0.00000 +1.00000
+0.00000 +1.00000 +65.40000 +0.00000 +1.00000
+0.00000 +1.00000 +73.10000 +1.00000 +0.00000
+0.00000 +1.00000 +72.60000 +1.00000 +0.00000
+0.00000 +1.00000 +63.20000 +0.00000 +1.00000
+0.00000 +1.00000 +71.70000 +0.00000 +1.00000
+0.00000 +1.00000 +77.70000 +1.00000 +0.00000
+0.00000 +1.00000 +76.90000 +0.00000 +1.00000
+0.00000 +1.00000 +73.20000 +0.00000 +1.00000
+0.00000 +1.00000 +76.20000 +0.00000 +1.00000
+0.00000 +1.00000 +84.70000 +0.00000 +1.00000
+0.00000 +1.00000 +69.60000 +1.00000 +0.00000
+0.00000 +1.00000 +70.10000 +0.00000 +1.00000
+0.00000 +1.00000 +70.90000 +1.00000 +0.00000
+0.00000 +1.00000 +77.00000 +1.00000 +0.00000
+0.00000 +1.00000 +74.50000 +0.00000 +1.00000
+0.00000 +1.00000 +74.40000 +1.00000 +0.00000
+0.00000 +1.00000 +72.90000 +0.00000 +1.00000
+0.00000 +1.00000 +74.00000 +0.00000 +1.00000
+0.00000 +1.00000 +70.60000 +0.00000 +1.00000
+0.00000 +1.00000 +78.20000 +0.00000 +1.00000
+0.00000 +1.00000 +70.60000 +0.00000 +1.00000
+0.00000 +1.00000 +80.30000 +1.00000 +0.00000
+0.00000 +1.00000 +65.10000 +0.00000 +1.00000
+0.00000 +1.00000 +69.80000 +0.00000 +1.00000
+0.00000 +1.00000 +71.10000 +0.00000 +1.00000
+1.00000 +0.00000 +81.30000 +0.00000 +1.00000
+1.00000 +0.00000 +75.40000 +0.00000 +1.00000
+1.00000 +0.00000 +73.90000 +1.00000 +0.00000
+1.00000 +0.00000 +64.10000 +0.00000 +1.00000
+1.00000 +0.00000 +80.10000 +0.00000 +1.00000
+1.00000 +0.00000 +78.30000 +0.00000 +1.00000
+1.00000 +0.00000 +73.20000 +0.00000 +1.00000
+1.00000 +0.00000 +75.30000 +1.00000 +0.00000
+1.00000 +0.00000 +65.60000 +0.00000 +1.00000
+1.00000 +0.00000 +62.40000 +0.00000 +1.00000
+1.00000 +0.00000 +77.20000 +1.00000 +0.00000
+1.00000 +0.00000 +70.70000 +1.00000 +0.00000
+1.00000 +0.00000 +70.10000 +1.00000 +0.00000
+1.00000 +0.00000 +82.60000 +1.00000 +0.00000
+1.00000 +0.00000 +80.20000 +1.00000 +0.00000
+1.00000 +0.00000 +65.90000 +1.00000 +0.00000
+1.00000 +0.00000 +59.70000 +1.00000 +0.00000
+1.00000 +0.00000 +71.80000 +0.00000 +1.00000
+1.00000 +0.00000 +72.40000 +1.00000 +0.00000
+1.00000 +0.00000 +80.50000 +1.00000 +0.00000
+1.00000 +0.00000 +62.90000 +0.00000 +1.00000
+1.00000 +0.00000 +67.40000 +0.00000 +1.00000
+1.00000 +0.00000 +80.20000 +1.00000 +0.00000
+1.00000 +0.00000 +85.50000 +0.00000 +1.00000
+1.00000 +0.00000 +65.90000 +0.00000 +1.00000
+1.00000 +0.00000 +89.10000 +1.00000 +0.00000
+1.00000 +0.00000 +56.40000 +0.00000 +1.00000
+1.00000 +0.00000 +82.70000 +0.00000 +1.00000
+1.00000 +0.00000 +68.30000 +0.00000 +1.00000
+1.00000 +0.00000 +74.00000 +0.00000 +1.00000

My contrast matix, contrast.mat is like this: the first and second columns are 
Control and AD

1 -1 0 0 0

in the mris_preproc command, i used the fsgd file, so ill also attach it to you!

Thanks in advance!
Hao



________________________________
De : 
freesurfer-boun...@nmr.mgh.harvard.edu<mailto:freesurfer-boun...@nmr.mgh.harvard.edu>
 
<freesurfer-boun...@nmr.mgh.harvard.edu><mailto:freesurfer-boun...@nmr.mgh.harvard.edu>
 de la part de Douglas N Greve 
<gr...@nmr.mgh.harvard.edu><mailto:gr...@nmr.mgh.harvard.edu>
Envoyé : lundi 6 juin 2016 17:47:15
À : freesurfer@nmr.mgh.harvard.edu<mailto:freesurfer@nmr.mgh.harvard.edu>
Objet : Re: [Freesurfer] CM_Group_analysis_Create tha contrast and design 
matrix by myself

looks like you put your command on two different lines

On 06/06/2016 05:16 AM, Hao wen wrote:
> Sorry, if you received my email, cuz I really stucked here, and i
> didnt find the related topics in the freesurfer support archive!
> Thank you in advance
> ------------------------------------------------------------------------
> *De :* Hao wen
> *Envoyé :* mercredi 1 juin 2016 19:32:24
> *À :* freesurfer@nmr.mgh.harvard.edu<mailto:freesurfer@nmr.mgh.harvard.edu>
> *Objet :* RE: [Freesurfer] CM_Group_analysis_Create tha contrast and
> design matrix by myself
> Ok, sorry:
>
> wen@HP1973:/aramis/dataARAMIS/users/junhao.wen/Data_AD_CN/ADNI_60_AD_CN_object_recon_all_output/glm/AD_CN_COVARIATES_AGE_GENDER/OWNDESIGNED_Alex_covariates_design_matrix_surfstat_version$<mailto:wen@HP1973:/aramis/dataARAMIS/users/junhao.wen/Data_AD_CN/ADNI_60_AD_CN_object_recon_all_output/glm/AD_CN_COVARIATES_AGE_GENDER/OWNDESIGNED_Alex_covariates_design_matrix_surfstat_version$>
> mri_glmfit \
> >   --glmdir lh.AD_CN_COVARIAETS_AGE_GENDER.glmdir
> ERROR: must specify an input X file or fsgd file or --osgm
> wen@HP1973:/aramis/dataARAMIS/users/junhao.wen/Data_AD_CN/ADNI_60_AD_CN_object_recon_all_output/glm/AD_CN_COVARIATES_AGE_GENDER/OWNDESIGNED_Alex_covariates_design_matrix_surfstat_version$<mailto:wen@HP1973:/aramis/dataARAMIS/users/junhao.wen/Data_AD_CN/ADNI_60_AD_CN_object_recon_all_output/glm/AD_CN_COVARIATES_AGE_GENDER/OWNDESIGNED_Alex_covariates_design_matrix_surfstat_version$>
>   --y lh.AD_CN_COVARIATES_AGE_GENDER_thickness_15.mgh \
> >   --C contrast.mtx \
> >   --X X.mat
> --y: command not found
> wen@HP1973:/aramis/dataARAMIS/users/junhao.wen/Data_AD_CN/ADNI_60_AD_CN_object_recon_all_output/glm/AD_CN_COVARIATES_AGE_GENDER/OWNDESIGNED_Alex_covariates_design_matrix_surfstat_version$<mailto:wen@HP1973:/aramis/dataARAMIS/users/junhao.wen/Data_AD_CN/ADNI_60_AD_CN_object_recon_all_output/glm/AD_CN_COVARIATES_AGE_GENDER/OWNDESIGNED_Alex_covariates_design_matrix_surfstat_version$>
>   --surf fsaverage lh \
> >   --cortex \
>
> Thanks
>
>
> ------------------------------------------------------------------------
> *De :* 
> freesurfer-boun...@nmr.mgh.harvard.edu<mailto:freesurfer-boun...@nmr.mgh.harvard.edu>
> <freesurfer-boun...@nmr.mgh.harvard.edu><mailto:freesurfer-boun...@nmr.mgh.harvard.edu>
>  de la part de Douglas N Greve
> <gr...@nmr.mgh.harvard.edu><mailto:gr...@nmr.mgh.harvard.edu>
> *Envoyé :* mercredi 1 juin 2016 18:47:19
> *À :* freesurfer@nmr.mgh.harvard.edu<mailto:freesurfer@nmr.mgh.harvard.edu>
> *Objet :* Re: [Freesurfer] CM_Group_analysis_Create tha contrast and
> design matrix by myself
> Can you send me just the terminal output from mri_glmfit?
>
> On 06/01/2016 12:45 PM, Hao wen wrote:
> > Hi, thanks for your reply, here is the output of the terminal in txt
> > file, hope to hear from you soon
> > Merci
> > Hao
> > ------------------------------------------------------------------------
> > *De :* 
> > freesurfer-boun...@nmr.mgh.harvard.edu<mailto:freesurfer-boun...@nmr.mgh.harvard.edu>
> > <freesurfer-boun...@nmr.mgh.harvard.edu><mailto:freesurfer-boun...@nmr.mgh.harvard.edu>
> >  de la part de Douglas Greve
> > <gr...@nmr.mgh.harvard.edu><mailto:gr...@nmr.mgh.harvard.edu>
> > *Envoyé :* mercredi 1 juin 2016 17:06:19
> > *À :* freesurfer@nmr.mgh.harvard.edu<mailto:freesurfer@nmr.mgh.harvard.edu>
> > *Objet :* Re: [Freesurfer] CM_Group_analysis_Create tha contrast and
> > design matrix by myself
> > please send the terminal output that includes the error
> >
> > On 6/1/16 8:10 AM, Hao wen wrote:
> >>
> >> Hello, freesurfers:
> >>
> >> I am doing group analysis, with two diff groups, so I want to know
> >> that how to create my own Contrast and Design matrix, because that I
> >> know in QDEC and CMline, in the freesurfer wiki, You just give the
> >> example for the DODS & DOSS, but it is not so flexible!
> >>
> >>
> >> I know that we should define --X in the command mris_glmfit, but I
> >> got some problems, here is my work flow:
> >>
> >>
> >> *#set the SUBJECTS_DIR*
> >> *export
> >>
> SUBJECTS_DIR=/aramis/dataARAMIS/users/junhao.wen/Data_AD_CN/ADNI_60_AD_CN_object_recon_all_output/*
> >> *cd
> >>
> $SUBJECTS_DIR/glm/AD_CN_COVARIATES_AGE_GENDER/OWNDESIGNED_Alex_covariates_design_matrix_surfstat_version*
> >> *
> >> *
> >> *
> >> *
> >> *mris_preproc --fsgd AD_CN_COVARIATES_AGE_GENDER.fsgd \*
> >> *  --cache-in thickness.fwhm15.fsaverage \*
> >> *  --target fsaverage \*
> >> *  --hemi lh \*
> >> *  --out lh.AD_CN_COVARIATES_AGE_GENDER_thickness_15.mgh*
> >> *
> >> *
> >> *
> >> mri_glmfit \
> >>   --glmdir lh.AD_CN_COVARIAETS_AGE_GENDER.glmdir
> >>   --y lh.AD_CN_COVARIATES_AGE_GENDER_thickness_15.mgh \
> >>   --C AD_CN_COVARIATS_AGE_GENDER.mtx \
> >>   or --C contrast.mat
> >>   --X X.mat
> >>   --surf fsaverage lh \
> >>   --cortex \
> >>
> >>
> >> *
> >> so, after I run the mri_glmfit, i got the errors, like, *you should
> >> define the --X or without --C, or cant find command --surf, --cortex,
> >> *i dont really understand what is the problem, and I create the
> >> design matrix and contrast matrix in Matlab
> >>
> >> Actually, I run the DODS, it works well, and the workflow, I dont
> >> change for the command mris_preproc, I just change the flags in
> >> mri_glmfit, someone could help me for this?
> >>
> >> Thanks in advance!
> >>
> >> Hao
> >>
> >>
> >> _______________________________________________
> >> Freesurfer mailing list
> >> Freesurfer@nmr.mgh.harvard.edu<mailto:Freesurfer@nmr.mgh.harvard.edu>
> >> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
> >
> >
> >
> > _______________________________________________
> > Freesurfer mailing list
> > Freesurfer@nmr.mgh.harvard.edu<mailto: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<mailto: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<http://www.nmr.mgh.harvard.edu/facility/filedrop/index.html>
> <http://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<mailto: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<mailto: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<mailto: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<http://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<mailto:Freesurfer@nmr.mgh.harvard.edu>
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer



_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu<mailto: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.

Reply via email to