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.g...@nih.gov<applewebdata://D38F487B-BA2B-4BF6-A9C4-96248AB2BE51/andrea.g...@nih.gov>

{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf210
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
{\colortbl;\red255\green255\blue255;}
\margl1440\margr1440\vieww10800\viewh8400\viewkind0
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural

\f0\fs24 \cf0 GroupDescriptorFile 1\
Title ParentEd_Sex_CTQABUSE_Age_n58\
Class MaltxLessThanCollegeMale\
Class MaltxLessThanCollegeFemale\
Class MaltxCollegeOrMoreMale\
Class MaltxCollegeOrMoreFemale\
Class NonmaltxLessThanCollegeMale\
Class NonmaltxLessThanCollegeFemale\
Class NonmaltxCollegeOrMoreMale\
Class NonmaltxCollegeOrMoreFemale\
Variables					Age	\
Input	1041WM	MaltxLessThanCollegeMale	18.0534\
Input	1165WM	MaltxLessThanCollegeMale	16.0520\
Input	1166	MaltxLessThanCollegeMale	14.2669\
Input	1043WM	MaltxLessThanCollegeMale	19.1200\
Input	1119	MaltxLessThanCollegeMale	15.1951\
Input	1123	MaltxLessThanCollegeMale	18.5578\
Input	1137	MaltxLessThanCollegeMale	17.8946\
Input	1167	MaltxLessThanCollegeFemale	16.8624\
Input	1100	MaltxLessThanCollegeFemale	17.9740\
Input	1158	MaltxLessThanCollegeFemale	17.7331\
Input	1177	MaltxLessThanCollegeFemale	17.2600\
Input	1163	MaltxCollegeOrMoreMale	17.9411\
Input	1094WM	MaltxCollegeOrMoreFemale	16.7118\
Input	1114WM	MaltxCollegeOrMoreFemale	17.2574\
Input	1139	MaltxCollegeOrMoreFemale	17.4456\
Input	1058	MaltxCollegeOrMoreFemale	17.7413\
Input	1142WM	MaltxCollegeOrMoreFemale	15.7180\
Input	1143WM	MaltxCollegeOrMoreFemale	13.7495\
Input	1153	MaltxCollegeOrMoreFemale	14.1109\
Input	1154	MaltxCollegeOrMoreFemale	15.3347\
Input	1178	MaltxCollegeOrMoreFemale	16.3285\
Input	1104	NonmaltxLessThanCollegeMale	16.7858\
Input	1121	NonmaltxLessThanCollegeMale	17.9904\
Input	1169	NonmaltxLessThanCollegeMale	17.8864\
Input	1005	NonmaltxLessThanCollegeMale	18.4969\
Input	1140	NonmaltxLessThanCollegeFemale	17.5688\
Input	1157WM	NonmaltxLessThanCollegeFemale	17.6044\
Input	1018	NonmaltxLessThanCollegeFemale	17.8015\
Input	1077	NonmaltxLessThanCollegeFemale	16.8515\
Input	1096	NonmaltxLessThanCollegeFemale	15.8583\
Input	1122	NonmaltxLessThanCollegeFemale	16.6400\
Input	1172	NonmaltxLessThanCollegeFemale	16.5969\
Input	1174	NonmaltxLessThanCollegeFemale	17.4100\
Input	1032	NonmaltxCollegeOrMoreMale	19.1600\
Input	1047	NonmaltxCollegeOrMoreMale	15.6359\
Input	1126	NonmaltxCollegeOrMoreMale	14.7488\
Input	1132	NonmaltxCollegeOrMoreMale	14.0561\
Input	1176	NonmaltxCollegeOrMoreMale	18.3025\
Input	1009	NonmaltxCollegeOrMoreMale	17.3333\
Input	1014	NonmaltxCollegeOrMoreMale	16.6680\
Input	1022	NonmaltxCollegeOrMoreMale	20.2355\
Input	1034	NonmaltxCollegeOrMoreMale	16.6708\
Input	1099	NonmaltxCollegeOrMoreMale	19.0582\
Input	1113	NonmaltxCollegeOrMoreMale	15.3758\
Input	1065	NonmaltxCollegeOrMoreFemale	19.2088\
Input	1097	NonmaltxCollegeOrMoreFemale	16.2464\
Input	1125	NonmaltxCollegeOrMoreFemale	17.6400\
Input	1134	NonmaltxCollegeOrMoreFemale	14.4832\
Input	1135	NonmaltxCollegeOrMoreFemale	16.2136\
Input	1161	NonmaltxCollegeOrMoreFemale	18.8200\
Input	1171	NonmaltxCollegeOrMoreFemale	17.9548\
Input	1173	NonmaltxCollegeOrMoreFemale	17.6454\
Input	1179	NonmaltxCollegeOrMoreFemale	17.5140\
Input	1180	NonmaltxCollegeOrMoreFemale	17.3306\
Input	1181	NonmaltxCollegeOrMoreFemale	16.1889\
Input	1079	NonmaltxCollegeOrMoreFemale	15.3867\
Input	1128WM	NonmaltxCollegeOrMoreFemale	15.2307\
Input	1175	NonmaltxCollegeOrMoreFemale	18.3354\
DefaultVariable Age}
{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf210
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
{\colortbl;\red255\green255\blue255;}
\margl1440\margr1440\vieww10800\viewh8400\viewkind0
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural

\f0\fs24 \cf0 GroupDescriptorFile 1\
Title ParentEd_Sex_CTQABUSE_Age_n58\
Class MaltxLessThanCollegeMale\
Class MaltxLessThanCollegeFemale\
Class MaltxCollegeOrMoreMale\
Class MaltxCollegeOrMoreFemale\
Class NonmaltxLessThanCollegeMale\
Class NonmaltxLessThanCollegeFemale\
Class NonmaltxCollegeOrMoreMale\
Class NonmaltxCollegeOrMoreFemale\
Variables					Age	\
Input	1041WM	MaltxLessThanCollegeMale	1.08\
Input	1165WM	MaltxLessThanCollegeMale	-.92\
Input	1166	MaltxLessThanCollegeMale	-2.70\
Input	1043WM	MaltxLessThanCollegeMale	2.15\
Input	1119	MaltxLessThanCollegeMale	-1.77\
Input	1123	MaltxLessThanCollegeMale	1.59\
Input	1137	MaltxLessThanCollegeMale	.92\
Input	1167	MaltxLessThanCollegeFemale	-.11\
Input	1100	MaltxLessThanCollegeFemale	1.00\
Input	1158	MaltxLessThanCollegeFemale	.76\
Input	1177	MaltxLessThanCollegeFemale	.29\
Input	1163	MaltxCollegeOrMoreMale	.97\
Input	1094WM	MaltxCollegeOrMoreFemale	-.26\
Input	1114WM	MaltxCollegeOrMoreFemale	.29\
Input	1139	MaltxCollegeOrMoreFemale	.48\
Input	1058	MaltxCollegeOrMoreFemale	.77\
Input	1142WM	MaltxCollegeOrMoreFemale	-1.25\
Input	1143WM	MaltxCollegeOrMoreFemale	-3.22\
Input	1153	MaltxCollegeOrMoreFemale	-2.86\
Input	1154	MaltxCollegeOrMoreFemale	-1.63\
Input	1178	MaltxCollegeOrMoreFemale	-.64\
Input	1104	NonmaltxLessThanCollegeMale	-.18\
Input	1121	NonmaltxLessThanCollegeMale	1.02\
Input	1169	NonmaltxLessThanCollegeMale	.92\
Input	1005	NonmaltxLessThanCollegeMale	1.53\
Input	1140	NonmaltxLessThanCollegeFemale	.60\
Input	1157WM	NonmaltxLessThanCollegeFemale	.63\
Input	1018	NonmaltxLessThanCollegeFemale	.83\
Input	1077	NonmaltxLessThanCollegeFemale	-.12\
Input	1096	NonmaltxLessThanCollegeFemale	-1.11\
Input	1122	NonmaltxLessThanCollegeFemale	-.33\
Input	1172	NonmaltxLessThanCollegeFemale	-.37\
Input	1174	NonmaltxLessThanCollegeFemale	.44\
Input	1032	NonmaltxCollegeOrMoreMale	2.19\
Input	1047	NonmaltxCollegeOrMoreMale	-1.33\
Input	1126	NonmaltxCollegeOrMoreMale	-2.22\
Input	1132	NonmaltxCollegeOrMoreMale	-2.91\
Input	1176	NonmaltxCollegeOrMoreMale	1.33\
Input	1009	NonmaltxCollegeOrMoreMale	.36\
Input	1014	NonmaltxCollegeOrMoreMale	-.30\
Input	1022	NonmaltxCollegeOrMoreMale	3.27\
Input	1034	NonmaltxCollegeOrMoreMale	-.30\
Input	1099	NonmaltxCollegeOrMoreMale	2.09\
Input	1113	NonmaltxCollegeOrMoreMale	-1.59\
Input	1065	NonmaltxCollegeOrMoreFemale	2.24\
Input	1097	NonmaltxCollegeOrMoreFemale	-.72\
Input	1125	NonmaltxCollegeOrMoreFemale	.67\
Input	1134	NonmaltxCollegeOrMoreFemale	-2.49\
Input	1135	NonmaltxCollegeOrMoreFemale	-.76\
Input	1161	NonmaltxCollegeOrMoreFemale	1.85\
Input	1171	NonmaltxCollegeOrMoreFemale	.99\
Input	1173	NonmaltxCollegeOrMoreFemale	.68\
Input	1179	NonmaltxCollegeOrMoreFemale	.54\
Input	1180	NonmaltxCollegeOrMoreFemale	.36\
Input	1181	NonmaltxCollegeOrMoreFemale	-.78\
Input	1079	NonmaltxCollegeOrMoreFemale	-1.58\
Input	1128WM	NonmaltxCollegeOrMoreFemale	-1.74\
Input	1175	NonmaltxCollegeOrMoreFemale	1.37\
DefaultVariable Age}
_______________________________________________
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