This is almost surely a problem with scaling as your covariates are
huge. Try subtracting the mean and dividing by the stddev before
entering into the FSGD file. Compute the means and stddevs across all
subjects.
doug
> <http://cyberstar129.hpc.rcc.psu.edu>
On 07/11/2016 03:20 PM, Jennifer Legault wrote:
> Hi Freesurfer Experts,
>
> I am trying to run mri_glmfit and while 90% of my files work, some of
> them display the error below. I have tried demeaning, and then tried
> multiplying this value by 100, and I still get the same error. Any
> feedback would be greatly appreciated.
>
> mris_preproc done
> srcsubject = fsaverage
> srcval = rh.mono_EnglishParityRT_age_gender_TIV.volume.00.mgh
> srctype =
> trgsubject = fsaverage
> trgval = rh.mono_EnglishParityRT_age_gender_TIV.volume.00B.mgh
> trgtype =
> srcsurfreg = sphere.reg
> trgsurfreg = sphere.reg
> srchemi = rh
> trghemi = rh
> frame = 0
> fwhm-in = 0
> fwhm-out = 0
> label-src = (null)
> label-trg = (null)
> OKToRevFaceOrder = 1
> Reading source surface reg
> /gpfs/scratch/jtl190/Math_reconstruction/fsaverage/surf/rh.sphere.reg
> Loading source data
> INFO: trgsubject = srcsubject
> Saving target data
> Saving to rh.mono_EnglishParityRT_age_gender_TIV.volume.00B.mgh
> gdfReadHeader: reading
> /gpfs/scratch/jtl190/FSGD_files/fsgd_math_mono_EnglishParityRT_age_gender_TIV_demean100.fsgd
> INFO: DeMeanFlag keyword not found, DeMeaning will NOT be done.
> Continuous Variable Means (all subjects)
> 0 Age 19.5833 1.32025
> 1 eTIV 1.61645e+06 145343
> 2 EnglishParityRT 0.00012207 25139.1
> Class Means of each Continuous Variable
> 1 Monolingual_male 19.7143 1678946.5893 -4197.2796
> 2 Monolingual_female 19.4000 1528966.6750 5876.1917
> INFO: gd2mtx_method is dods
> Reading source surface
> /gpfs/scratch/jtl190/Math_reconstruction/fsaverage/surf/rh.white
> Number of vertices 163842
> Number of faces 327680
> Total area 65020.765625
> AvgVtxArea 0.396850
> AvgVtxDist 0.717994
> StdVtxDist 0.193566
>
> $Id: mri_glmfit.c,v 1.196.2.8 2012/11/01 18:51:41 greve Exp $
> cwd /gpfs/scratch/jtl190/Math_reconstruction
> cmdline mri_glmfit --y
> rh.mono_EnglishParityRT_age_gender_TIV.volume.00B.mgh --fsgd
> /gpfs/scratch/jtl190/FSGD_files/fsgd_math_mono_EnglishParityRT_age_gender_TIV_demean100.fsgd
> --C
> /gpfs/scratch/jtl190/Contrast_files/Contrast_math_monly_EnglishParityRT_a_g_TIV.txt
> --surf fsaverage rh --cortex --glmdir
> rh.mono_EnglishParityRT_age_gender_TIV_100.glmdir
> sysname Linux
> hostname cyberstar129.hpc.rcc.psu.edu
> _______________________________________________> machine x86_64
> user jtl190
> FixVertexAreaFlag = 1
> UseMaskWithSmoothing 1
> OneSampleGroupMean 0
> y
> /gpfs/scratch/jtl190/Math_reconstruction/rh.mono_EnglishParityRT_age_gender_TIV.volume.00B.mgh
> logyflag 0
> usedti 0
> FSGD
> /gpfs/scratch/jtl190/FSGD_files/fsgd_math_mono_EnglishParityRT_age_gender_TIV_demean100.fsgd
> labelmask
> /gpfs/scratch/jtl190/Math_reconstruction/fsaverage/label/rh.cortex.label
> maskinv 0
> glmdir rh.mono_EnglishParityRT_age_gender_TIV_100.glmdir
> IllCondOK 0
> ReScaleX 1
> DoFFx 0
> Creating output directory
> rh.mono_EnglishParityRT_age_gender_TIV_100.glmdir
> Loading y from
> /gpfs/scratch/jtl190/Math_reconstruction/rh.mono_EnglishParityRT_age_gender_TIV.volume.00B.mgh
> INFO: gd2mtx_method is dods
> Saving design matrix to
> rh.mono_EnglishParityRT_age_gender_TIV_100.glmdir/Xg.dat
> Normalized matrix condition is 22568.9
> Design matrix ------------------
> 1.000 0.000 18.000 0.000 1865790.250 0.000 -8952.208 0.000;
> 0.000 1.000 0.000 19.000 0.000 1520429.625 0.000 -4605.208;
> 1.000 0.000 19.000 0.000 1749716.750 0.000 -39407.207 0.000;
> 0.000 1.000 0.000 18.000 0.000 1589109.250 0.000 -17967.209;
> 1.000 0.000 21.000 0.000 1472295.125 0.000 19531.791 0.000;
> 1.000 0.000 18.000 0.000 1580381.375 0.000 -17027.209 0.000;
> 1.000 0.000 20.000 0.000 1813373.500 0.000 16152.792 0.000;
> 1.000 0.000 21.000 0.000 1638616.500 0.000 -9074.208 0.000;
> 0.000 1.000 0.000 21.000 0.000 1297920.500 0.000 61860.793;
> 0.000 1.000 0.000 18.000 0.000 1634762.625 0.000 -22671.209;
> 0.000 1.000 0.000 21.000 0.000 1602611.375 0.000 12763.792;
> 1.000 0.000 21.000 0.000 1632452.625 0.000 9395.292 0.000;
> --------------------------------
> ERROR: matrix is ill-conditioned or badly scaled, condno = 22568.9
> --------------------------------
> 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
> rh.mono_EnglishParityRT_age_gender_TIV.volume.00B.mgh --fsgd
> /gpfs/scratch/jtl190/FSGD_files/fsgd_math_mono_EnglishParityRT_age_gender_TIV_demean100.fsgd
> --C
> /gpfs/scratch/jtl190/Contrast_files/Contrast_math_monly_EnglishParityRT_a_g_TIV.txt
> --surf fsaverage rh --cortex --glmdir
> rh.mono_EnglishParityRT_age_gender_TIV_100.glmdir
> 2. The FSGD file (if using one)
> 3. And the design matrix above
>
>
> I am also attaching the FSGD file.
>
> Best,
>
> Jennifer Legault
>
>
> 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
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.