Hi Andrea, can you send the files in their original format (not rtf)?
On 10/5/15 12:58 PM, Gold, Andrea (NIH/NIMH) [F] wrote:
Hi,
I got the following error during my first time running the mri_glmfit command:
mri_glmfit --y Model1_Maltx_ParentEd_Sex_Age_n58-lh-thickness.mgh --fsgd Model1_Maltx_ParentEd_Sex_Age_n58.fsgd --C Model1_Maltx.mtx --C Model1_ParentEd.mtx --surf fsaverage lh --glmdir Model1_Maltx_ParentEd_Sex_Age_n58-lh-thickness.glmdir
ERROR: matrix is ill-conditioned or badly scaled, condno = 1e+08
Possible problem with experimental design:
Check for duplicate entries and/or lack of range of
continuous variables within a class.
We are trying to look at the main effects of two discrete variables in the same model (I.e., effect of var1 while controlling for var2), while also regressing out sex (class) and age (variable). We don’t care about the interaction term(s).
There are 16 regressors = 8 classes * (1 variable +1) = 16.
The FSGD file is attached, and I copied the design matrix below.
From reading the archives, I tried Doug’s suggestion of "/cat old.fsgd | sed 's/\r/\n/g' > new.fsgd” but that did not fix it./
Then I tried removing the overall mean (across all 58 subjects) and got the same error – see attached “*_demeaned.fsgd” file.
/ /
Thank you for your help with troubleshooting this error.
Best,
Andrea
Design matrix ------------------
1.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 18.053 0.000 0.000 0.000 0.000 0.000 0.000 0.000;
1.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 16.052 0.000 0.000 0.000 0.000 0.000 0.000 0.000;
1.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 14.267 0.000 0.000 0.000 0.000 0.000 0.000 0.000;
1.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 19.120 0.000 0.000 0.000 0.000 0.000 0.000 0.000;
1.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 15.195 0.000 0.000 0.000 0.000 0.000 0.000 0.000;
1.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 18.558 0.000 0.000 0.000 0.000 0.000 0.000 0.000;
1.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 17.895 0.000 0.000 0.000 0.000 0.000 0.000 0.000;
0.000 1.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 16.862 0.000 0.000 0.000 0.000 0.000 0.000;
0.000 1.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 17.974 0.000 0.000 0.000 0.000 0.000 0.000;
0.000 1.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 17.733 0.000 0.000 0.000 0.000 0.000 0.000;
0.000 1.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 17.260 0.000 0.000 0.000 0.000 0.000 0.000;
0.000 0.000 1.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 17.941 0.000 0.000 0.000 0.000 0.000;
0.000 0.000 0.000 1.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 16.712 0.000 0.000 0.000 0.000;
0.000 0.000 0.000 1.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 17.257 0.000 0.000 0.000 0.000;
0.000 0.000 0.000 1.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 17.446 0.000 0.000 0.000 0.000;
0.000 0.000 0.000 1.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 17.741 0.000 0.000 0.000 0.000;
0.000 0.000 0.000 1.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 15.718 0.000 0.000 0.000 0.000;
0.000 0.000 0.000 1.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 13.750 0.000 0.000 0.000 0.000;
0.000 0.000 0.000 1.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 14.111 0.000 0.000 0.000 0.000;
0.000 0.000 0.000 1.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 15.335 0.000 0.000 0.000 0.000;
0.000 0.000 0.000 1.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 16.329 0.000 0.000 0.000 0.000;
0.000 0.000 0.000 0.000 1.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 16.786 0.000 0.000 0.000;
0.000 0.000 0.000 0.000 1.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 17.990 0.000 0.000 0.000;
0.000 0.000 0.000 0.000 1.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 17.886 0.000 0.000 0.000;
0.000 0.000 0.000 0.000 1.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 18.497 0.000 0.000 0.000;
0.000 0.000 0.000 0.000 0.000 1.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 17.569 0.000 0.000;
0.000 0.000 0.000 0.000 0.000 1.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 17.604 0.000 0.000;
0.000 0.000 0.000 0.000 0.000 1.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 17.802 0.000 0.000;
0.000 0.000 0.000 0.000 0.000 1.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 16.851 0.000 0.000;
0.000 0.000 0.000 0.000 0.000 1.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 15.858 0.000 0.000;
0.000 0.000 0.000 0.000 0.000 1.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 16.640 0.000 0.000;
0.000 0.000 0.000 0.000 0.000 1.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 16.597 0.000 0.000;
0.000 0.000 0.000 0.000 0.000 1.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 17.410 0.000 0.000;
0.000 0.000 0.000 0.000 0.000 0.000 1.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 19.160 0.000;
0.000 0.000 0.000 0.000 0.000 0.000 1.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 15.636 0.000;
0.000 0.000 0.000 0.000 0.000 0.000 1.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 14.749 0.000;
0.000 0.000 0.000 0.000 0.000 0.000 1.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 14.056 0.000;
0.000 0.000 0.000 0.000 0.000 0.000 1.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 18.302 0.000;
0.000 0.000 0.000 0.000 0.000 0.000 1.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 17.333 0.000;
0.000 0.000 0.000 0.000 0.000 0.000 1.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 16.668 0.000;
0.000 0.000 0.000 0.000 0.000 0.000 1.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 20.236 0.000;
0.000 0.000 0.000 0.000 0.000 0.000 1.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 16.671 0.000;
0.000 0.000 0.000 0.000 0.000 0.000 1.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 19.058 0.000;
0.000 0.000 0.000 0.000 0.000 0.000 1.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 15.376 0.000;
0.000 0.000 0.000 0.000 0.000 0.000 0.000 1.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 19.209;
0.000 0.000 0.000 0.000 0.000 0.000 0.000 1.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 16.246;
0.000 0.000 0.000 0.000 0.000 0.000 0.000 1.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 17.640;
0.000 0.000 0.000 0.000 0.000 0.000 0.000 1.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 14.483;
0.000 0.000 0.000 0.000 0.000 0.000 0.000 1.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 16.214;
0.000 0.000 0.000 0.000 0.000 0.000 0.000 1.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 18.820;
0.000 0.000 0.000 0.000 0.000 0.000 0.000 1.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 17.955;
0.000 0.000 0.000 0.000 0.000 0.000 0.000 1.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 17.645;
0.000 0.000 0.000 0.000 0.000 0.000 0.000 1.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 17.514;
0.000 0.000 0.000 0.000 0.000 0.000 0.000 1.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 17.331;
0.000 0.000 0.000 0.000 0.000 0.000 0.000 1.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 16.189;
0.000 0.000 0.000 0.000 0.000 0.000 0.000 1.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 15.387;
0.000 0.000 0.000 0.000 0.000 0.000 0.000 1.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 15.231;
0.000 0.000 0.000 0.000 0.000 0.000 0.000 1.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 18.335;
-- Andrea Gold, Ph.D. Section on Development and Affective Neuroscience National Institute of Mental Health Room 201, Bldg. 15K, MSC 2670 Bethesda, MD 20892-2670 Phone: 301-827-9804 Fax: 301-402-2010 Email: andrea.gold@nih.gov applewebdata://D38F487B-BA2B-4BF6-A9C4-96248AB2BE51/andrea.gold@nih.gov
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer