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-bounces@nmr.mgh.harvard.edu freesurfer-bounces@nmr.mgh.harvard.edu de la part de Douglas N Greve greve@nmr.mgh.harvard.edu *Envoyé :* lundi 6 juin 2016 17:47:15 *À :* 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 *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$
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$
--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$
--surf fsaverage lh \
--cortex \
Thanks
*De :* freesurfer-bounces@nmr.mgh.harvard.edu freesurfer-bounces@nmr.mgh.harvard.edu de la part de Douglas N Greve greve@nmr.mgh.harvard.edu *Envoyé :* mercredi 1 juin 2016 18:47:19 *À :* 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-bounces@nmr.mgh.harvard.edu freesurfer-bounces@nmr.mgh.harvard.edu de la part de Douglas Greve greve@nmr.mgh.harvard.edu *Envoyé :* mercredi 1 juin 2016 17:06:19 *À :* 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 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 greve@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 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 greve@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 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