External Email - Use Caution
Dear FreeSurfer experts,
I get this error message when running group analysis on cortical thickness using glmfit: ERROR: dimension mismatch between X and contrast Contrasts/ADHD_COM_TD_age_IQ.mtx X has 9 cols, C has 10 cols
Please find attached the FSGD file, the contrast file and the terminal output below.
I want to do ANCOVA with three groups (ADHD, COM and TD) controlling for the effects of age and IQ. So I assume the regressors would be ADHD COM TD age IQ and my contras matrix 1 -1 0 0 0 1 0 -1 0 0 according to information from these two tutorials: https://surfer.nmr.mgh.harvard.edu/fswiki/Fsgdf3G0V and https://surfer.nmr.mgh.harvard.edu/fswiki/Fsgdf2G2V.
Can anybody help me out? Where am I wrong? Why does glmfit assume X has 9 cols?
Any help would be much appreciated, thank you in advance!
Best Lea
Terminal Output: mri_glmfit --y rh.thickness.ADHD_COM_TD_orig.15.mgh --fsgd FSGD/ADHD_COM_TD_orig_age_IQ.fsgd --C Contrasts/ADHD_COM_TD_age_IQ.mtx --surf fsaverage rh --cortex --glmdir rh.thickness.ADHD_COM_TD_orig_age_IQ.15.glmdir gdfRead(): reading FSGD/ADHD_COM_TD_orig_age_IQ.fsgd INFO: DeMeanFlag keyword not found, DeMeaning will NOT be done. Continuous Variable Means (all subjects) 0 Age 13.6015 1.73148 1 IQ 107.288 11.1649 Class Means of each Continuous Variable 1 ADHD 13.7193 104.3478 2 COM 12.8657 105.3929 3 TD 14.0119 112.3784 INFO: gd2mtx_method is dods Reading source surface /Volumes/Elements/ADHS_MRI/T1/FreeSurfer/Auswertung_cortical/Lea_2018/SUBJECTS/fsaverage/surf/rh.white Number of vertices 163842 Number of faces 327680 Total area 65020.839844 AvgVtxArea 0.396851 AvgVtxDist 0.717994 StdVtxDist 0.193566
$Id: mri_glmfit.c,v 1.241.2.4 2016/12/08 22:02:40 zkaufman Exp $ cwd /Volumes/Elements/ADHS_MRI/T1/FreeSurfer/Auswertung_cortical/Lea_2018/SUBJECTS cmdline mri_glmfit.bin --y rh.thickness.ADHD_COM_TD_orig.15.mgh --fsgd FSGD/ADHD_COM_TD_orig_age_IQ.fsgd --C Contrasts/ADHD_COM_TD_age_IQ.mtx --surf fsaverage rh --cortex --glmdir rh.thickness.ADHD_COM_TD_orig_age_IQ.15.glmdir sysname Darwin hostname edr06188.dip.tu-dresden.de machine x86_64 user Lea FixVertexAreaFlag = 1 UseMaskWithSmoothing 1 OneSampleGroupMean 0 y /Volumes/Elements/ADHS_MRI/T1/FreeSurfer/Auswertung_cortical/Lea_2018/SUBJECTS/rh.thickness.ADHD_COM_TD_orig.15.mgh logyflag 0 usedti 0 FSGD FSGD/ADHD_COM_TD_orig_age_IQ.fsgd labelmask /Volumes/Elements/ADHS_MRI/T1/FreeSurfer/Auswertung_cortical/Lea_2018/SUBJECTS/fsaverage/label/rh.cortex.label maskinv 0 glmdir rh.thickness.ADHD_COM_TD_orig_age_IQ.15.glmdir IllCondOK 0 ReScaleX 1 DoFFx 0 Creating output directory rh.thickness.ADHD_COM_TD_orig_age_IQ.15.glmdir Loading y from /Volumes/Elements/ADHS_MRI/T1/FreeSurfer/Auswertung_cortical/Lea_2018/SUBJECTS/rh.thickness.ADHD_COM_TD_orig.15.mgh ... done reading. INFO: gd2mtx_method is dods Saving design matrix to rh.thickness.ADHD_COM_TD_orig_age_IQ.15.glmdir/Xg.dat Computing normalized matrix Normalized matrix condition is 1027 Matrix condition is 4.07619e+06 Found 149926 points in label. Pruning voxels by thr: 1.175494e-38 Found 149926 voxels in mask Saving mask to rh.thickness.ADHD_COM_TD_orig_age_IQ.15.glmdir/mask.mgh Reshaping mriglm->mask... search space = 74490.844410 ERROR: dimension mismatch between X and contrast Contrasts/ADHD_COM_TD_age_IQ.mtx X has 9 cols, C has 10 cols
You have 3 groups and 2 covariates, so you will have 3*(2+1)=9 regressors, in this order ADHD-offset COM-offset TD-offset ADHD-Age COM-Age TD-AGE ADHC-IQ COM-IQ TD-IQ You will need to have a single value for each regressor in your contrast matrix, meaning that you should have 9 values. You have 10 values, thus the error.
On 09/27/2018 09:39 AM, Backhausen, Lea wrote:
External Email - Use Caution
Dear FreeSurfer experts,
I get this error message when running group analysis on cortical thickness using glmfit: ERROR: dimension mismatch between X and contrast Contrasts/ADHD_COM_TD_age_IQ.mtx X has 9 cols, C has 10 cols
Please find attached the FSGD file, the contrast file and the terminal output below.
I want to do ANCOVA with three groups (ADHD, COM and TD) controlling for the effects of age and IQ. So I assume the regressors would be ADHD COM TD age IQ and my contras matrix 1 -1 0 0 0 1 0 -1 0 0 according to information from these two tutorials: https://surfer.nmr.mgh.harvard.edu/fswiki/Fsgdf3G0V and https://surfer.nmr.mgh.harvard.edu/fswiki/Fsgdf2G2V.
Can anybody help me out? Where am I wrong? Why does glmfit assume X has 9 cols?
Any help would be much appreciated, thank you in advance!
Best Lea
Terminal Output: mri_glmfit --y rh.thickness.ADHD_COM_TD_orig.15.mgh --fsgd FSGD/ADHD_COM_TD_orig_age_IQ.fsgd --C Contrasts/ADHD_COM_TD_age_IQ.mtx --surf fsaverage rh --cortex --glmdir rh.thickness.ADHD_COM_TD_orig_age_IQ.15.glmdir gdfRead(): reading FSGD/ADHD_COM_TD_orig_age_IQ.fsgd INFO: DeMeanFlag keyword not found, DeMeaning will NOT be done. Continuous Variable Means (all subjects) 0 Age 13.6015 1.73148 1 IQ 107.288 11.1649 Class Means of each Continuous Variable 1 ADHD 13.7193 104.3478 2 COM 12.8657 105.3929 3 TD 14.0119 112.3784 INFO: gd2mtx_method is dods Reading source surface /Volumes/Elements/ADHS_MRI/T1/FreeSurfer/Auswertung_cortical/Lea_2018/SUBJECTS/fsaverage/surf/rh.white Number of vertices 163842 Number of faces 327680 Total area 65020.839844 AvgVtxArea 0.396851 AvgVtxDist 0.717994 StdVtxDist 0.193566
$Id: mri_glmfit.c,v 1.241.2.4 2016/12/08 22:02:40 zkaufman Exp $ cwd /Volumes/Elements/ADHS_MRI/T1/FreeSurfer/Auswertung_cortical/Lea_2018/SUBJECTS cmdline mri_glmfit.bin --y rh.thickness.ADHD_COM_TD_orig.15.mgh --fsgd FSGD/ADHD_COM_TD_orig_age_IQ.fsgd --C Contrasts/ADHD_COM_TD_age_IQ.mtx --surf fsaverage rh --cortex --glmdir rh.thickness.ADHD_COM_TD_orig_age_IQ.15.glmdir sysname Darwin hostname edr06188.dip.tu-dresden.de machine x86_64 user Lea FixVertexAreaFlag = 1 UseMaskWithSmoothing 1 OneSampleGroupMean 0 y /Volumes/Elements/ADHS_MRI/T1/FreeSurfer/Auswertung_cortical/Lea_2018/SUBJECTS/rh.thickness.ADHD_COM_TD_orig.15.mgh logyflag 0 usedti 0 FSGD FSGD/ADHD_COM_TD_orig_age_IQ.fsgd labelmask /Volumes/Elements/ADHS_MRI/T1/FreeSurfer/Auswertung_cortical/Lea_2018/SUBJECTS/fsaverage/label/rh.cortex.label maskinv 0 glmdir rh.thickness.ADHD_COM_TD_orig_age_IQ.15.glmdir IllCondOK 0 ReScaleX 1 DoFFx 0 Creating output directory rh.thickness.ADHD_COM_TD_orig_age_IQ.15.glmdir Loading y from /Volumes/Elements/ADHS_MRI/T1/FreeSurfer/Auswertung_cortical/Lea_2018/SUBJECTS/rh.thickness.ADHD_COM_TD_orig.15.mgh ... done reading. INFO: gd2mtx_method is dods Saving design matrix to rh.thickness.ADHD_COM_TD_orig_age_IQ.15.glmdir/Xg.dat Computing normalized matrix Normalized matrix condition is 1027 Matrix condition is 4.07619e+06 Found 149926 points in label. Pruning voxels by thr: 1.175494e-38 Found 149926 voxels in mask Saving mask to rh.thickness.ADHD_COM_TD_orig_age_IQ.15.glmdir/mask.mgh Reshaping mriglm->mask... search space = 74490.844410 ERROR: dimension mismatch between X and contrast Contrasts/ADHD_COM_TD_age_IQ.mtx X has 9 cols, C has 10 cols
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
freesurfer@nmr.mgh.harvard.edu