I added normalizing and demeaning code like you suggested in my fsgd file and perform the GLM analysis (mri_glmfit). However, my covariates were only demeaned (DeMeanFlag 1) but they were not normalized (ReScaleFlag 1). Hence I received this error from freesurfer. I have attached my fsgd files and contrast matrix
INFO: demeaning continuous variables
Continuous Variable Means (all subjects)
0 Age 39.9375 17.3312
1 Education 15.5625 1.99902
2 Firstscore 1.03375 0.341785
3 Secondscore 1.03906 0.370678
4 Thirdscore 1.13844 0.4768
5 Averagescore 1.07375 0.364046
Class Means of each Continuous Variable
1 Group1 35.6316 15.0526 1.0342 1.2111 1.4289 1.2305
2 Group2 46.2308 16.3077 1.0331 0.7877 0.7138 0.8446
INFO: gd2mtx_method is dods
Reading source surface /Users/ctartaglia/Desktop/improvervsdeclinermri/fsaverage/surf/lh.white
Number of vertices 163842
Number of faces 327680
Total area 65416.648438
AvgVtxArea 0.399267
AvgVtxDist 0.721953
StdVtxDist 0.195470
$Id: mri_glmfit.c,v 1.196.2.6 2011/05/05 20:54:25 greve Exp $
cwd /Users/ctartaglia/Desktop/improvervsdeclinermri
cmdline mri_glmfit --y lh.NeuroTrackerscore.thickness.10B.mgh --fsgd NeuroTrackerscore.fsgd dods --C new.firstmatrix.mtx --C new.secondmatrix.mtx --C new.thirdmatrix.mtx --C new.fourthmatrix.mtx --C new.fifthmatrix.mtx --C new.sixthmatrix.mtx --C new.seventhmatrix.mtx --C new.eightmatrix.mtx --C new.ninethmatrix.mtx --C new.tenthmatrix.mtx --surf fsaverage lh --cortex --glmdir lh.NeuroTrackerscore.glmdir
sysname Darwin
hostname
twh-ct-lab4-imac.uhn.camachine x86_64
user ctartaglia
FixVertexAreaFlag = 1
UseMaskWithSmoothing 1
OneSampleGroupMean 0
y /Users/ctartaglia/Desktop/improvervsdeclinermri/lh.NeuroTrackerscore.thickness.10B.mgh
logyflag 0
usedti 0
FSGD NeuroTrackerscore.fsgd
labelmask /Users/ctartaglia/Desktop/improvervsdeclinermri/fsaverage/label/lh.cortex.label
maskinv 0
glmdir lh.NeuroTrackerscore.glmdir
IllCondOK 0
ReScaleX 1
DoFFx 0
Creating output directory lh.NeuroTrackerscore.glmdir
Loading y from /Users/ctartaglia/Desktop/improvervsdeclinermri/lh.NeuroTrackerscore.thickness.10B.mgh
INFO: gd2mtx_method is dods
Saving design matrix to lh.NeuroTrackerscore.glmdir/Xg.dat
Normalized matrix condition is 115605
Design matrix ------------------
1.000 0.000 -0.729 0.000 -0.026 0.000 1.889 0.000 1.535 0.000 1.428 0.000 1.729 0.000;
1.000 0.000 0.425 0.000 0.474 0.000 -0.568 0.000 -0.866 0.000 -0.501 0.000 -0.716 0.000;
1.000 0.000 0.194 0.000 0.974 0.000 -0.715 0.000 -1.001 0.000 -0.438 0.000 -0.771 0.000;
1.000 0.000 -0.960 0.000 -1.027 0.000 -0.568 0.000 -0.408 0.000 -0.354 0.000 -0.496 0.000;
1.000 0.000 -0.440 0.000 -1.027 0.000 0.075 0.000 -0.246 0.000 -0.124 0.000 -0.139 0.000;
1.000 0.000 -0.440 0.000 1.474 0.000 -0.188 0.000 0.132 0.000 -0.208 0.000 -0.111 0.000;
1.000 0.000 0.079 0.000 0.474 0.000 -0.480 0.000 -0.165 0.000 -0.124 0.000 -0.276 0.000;
1.000 0.000 -0.902 0.000 -0.527 0.000 -0.100 0.000 0.429 0.000 0.044 0.000 0.108 0.000;
1.000 0.000 1.291 0.000 0.474 0.000 -0.188 0.000 -0.246 0.000 -0.040 0.000 0.108 0.000;
1.000 0.000 -0.440 0.000 1.474 0.000 -0.480 0.000 -0.569 0.000 -0.900 0.000 -0.743 0.000;
1.000 0.000 0.598 0.000 0.474 0.000 -0.773 0.000 -0.408 0.000 0.317 0.000 -0.249 0.000;
1.000 0.000 -0.844 0.000 0.474 0.000 1.597 0.000 1.535 0.000 0.736 0.000 1.317 0.000;
1.000 0.000 -0.787 0.000 0.474 0.000 1.363 0.000 0.024 0.000 0.422 0.000 0.603 0.000;
1.000 0.000 -0.960 0.000 -1.027 0.000 1.480 0.000 1.265 0.000 1.428 0.000 1.509 0.000;
1.000 0.000 -1.075 0.000 -1.527 0.000 -0.100 0.000 -0.327 0.000 -0.270 0.000 -0.276 0.000;
1.000 0.000 0.887 0.000 0.474 0.000 -0.276 0.000 0.887 0.000 0.527 0.000 0.438 0.000;
1.000 0.000 0.483 0.000 0.474 0.000 0.544 0.000 0.240 0.000 0.149 0.000 0.301 0.000;
1.000 0.000 2.445 0.000 -1.527 0.000 -1.241 0.000 -0.246 0.000 -0.585 0.000 -0.743 0.000;
1.000 0.000 1.175 0.000 -1.027 0.000 -1.270 0.000 -1.568 0.000 -1.508 0.000 -1.595 0.000;
0.000 1.000 0.000 0.217 0.000 0.847 0.000 0.254 0.000 0.411 0.000 0.474 0.000 0.427;
0.000 1.000 0.000 -1.513 0.000 -0.654 0.000 0.254 0.000 0.141 0.000 -0.239 0.000 0.015;
0.000 1.000 0.000 0.102 0.000 -0.154 0.000 -1.764 0.000 -1.181 0.000 -0.763 0.000 -1.276;
0.000 1.000 0.000 -1.340 0.000 -0.154 0.000 1.600 0.000 1.166 0.000 1.062 0.000 1.361;
0.000 1.000 0.000 -1.687 0.000 0.346 0.000 1.366 0.000 1.274 0.000 0.999 0.000 1.306;
0.000 1.000 0.000 0.275 0.000 0.847 0.000 -0.828 0.000 -0.264 0.000 -0.239 0.000 -0.452;
0.000 1.000 0.000 -0.186 0.000 0.847 0.000 0.869 0.000 0.276 0.000 0.328 0.000 0.509;
0.000 1.000 0.000 0.737 0.000 -0.154 0.000 -0.623 0.000 -0.506 0.000 -0.239 0.000 -0.480;
0.000 1.000 0.000 -0.013 0.000 1.347 0.000 -0.623 0.000 0.006 0.000 -0.008 0.000 -0.205;
0.000 1.000 0.000 1.025 0.000 -1.655 0.000 -0.331 0.000 -0.641 0.000 -0.532 0.000 -0.562;
0.000 1.000 0.000 0.160 0.000 -0.154 0.000 1.600 0.000 0.654 0.000 0.369 0.000 0.894;
0.000 1.000 0.000 1.833 0.000 -2.155 0.000 -1.852 0.000 -1.828 0.000 -1.287 0.000 -1.771;
0.000 1.000 0.000 0.391 0.000 0.847 0.000 0.079 0.000 0.492 0.000 0.076 0.000 0.235;
--------------------------------
ERROR: matrix is ill-conditioned or badly scaled, condno = 115605
--------------------------------
Possible problem with experimental design:
Check for duplicate entries and/or lack of range of
continuous variables within a class.
If you seek help with this problem, make sure to send:
1. Your command line:
mri_glmfit --y lh.NeuroTrackerscore.thickness.10B.mgh --fsgd NeuroTrackerscore.fsgd dods --C new.firstmatrix.mtx --C new.secondmatrix.mtx --C new.thirdmatrix.mtx --C new.fourthmatrix.mtx --C new.fifthmatrix.mtx --C new.sixthmatrix.mtx --C new.seventhmatrix.mtx --C new.eightmatrix.mtx --C new.ninethmatrix.mtx --C new.tenthmatrix.mtx --surf fsaverage lh --cortex --glmdir lh.NeuroTrackerscore.glmdir
2. The FSGD file (if using one)
3. And the design matrix above