Re: [Freesurfer] mri_glmfit ERROR: matrix is ill-conditioned or badly scaled -

2020-05-13 Thread Douglas N. Greve
This is a design problem that will not be solved by simply forcing 
glmfit to run. I would remove that class and those subjectgs


On 5/13/2020 2:33 PM, Marina Fernández wrote:


External Email - Use Caution

Thank you, Doug.

That makes sense.
Do you think in this case it is a good option to add the flag 
--illcond to run this analysis without getting an error? or is it 
better not to use the variable apoe in these statistical analyzes?

What do you recommend us?

Best wishes,
Marina.

___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

Re: [Freesurfer] mri_glmfit ERROR: matrix is ill-conditioned or badly scaled -

2020-05-13 Thread Marina Fernández
External Email - Use Caution

 Thank you, Doug.

That makes sense.
Do you think in this case it is a good option to add the flag --illcond to
run this analysis without getting an error? or is it better not to use the
variable apoe in these statistical analyzes?
What do you recommend us?

Best wishes,
Marina.
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

Re: [Freesurfer] mri_glmfit ERROR: matrix is ill-conditioned or badly scaled -

2020-05-13 Thread Douglas N. Greve
The problem is that class 3 (smaleapoe) only has two members but you 
have four covariates. When you use DODS, each class gets its own fit to 
the data. In this case, class 3 is trying to solve for 5 unkowns (offset 
+ 4 slopes) with only two data points.


On 5/13/2020 10:18 AM, Marina Fernández wrote:


External Email - Use Caution

Hi Douglas,

I email you the fsgd file and I have also sent it through FTP.

Thank you for your attention.

Best regards,
Marina.

___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

Re: [Freesurfer] mri_glmfit ERROR: matrix is ill-conditioned or badly scaled -

2020-05-13 Thread Marina Fernández
External Email - Use Caution

Hi Douglas,

I email you the fsgd file and I have also sent it through FTP.

Thank you for your attention.

Best regards,
Marina.
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

Re: [Freesurfer] mri_glmfit ERROR: matrix is ill-conditioned or badly scaled -

2020-05-12 Thread Douglas N. Greve

Can you email the fsgd file?

On 5/12/2020 1:35 PM, Marina Fernández wrote:


External Email - Use Caution

Dear Freesurfer experts,

I get the error that you can find at the end of this message when I am 
running mri_glmfit.


Whenever I run an analysis in which the experimental design has more 
than 12 columns, I get the same error, whereas if the experimental 
design has less than 12 columns, the analysis is successful.


I also send you the fsgd.txt file (through FTP File Exchange). In this 
file you can see that there are four groups that have been created by 
the combination of two discrete variables (sex and apoe-type).


How can I solve this problem?

Thank you in advance.



ERROR MESSAGE:
(...)

Saving design matrix to 
/usr/local/freesurfer/subjects/amy_frapsaliva_stats/stats/cortex/cortex_caseageeducfrap/pruebax_frapsalgroup_NEG/lh.fsgd_subj_gauss001/Xg.dat

Computing normalized matrix
Normalized matrix condition is 1e+08
Design matrix --
 0.0   1.0   0.0   0.0   0.0   0.83619 0.0   
0.0   0.0   0.91963   0.0   0.0 0.0   0.79984   
0.0   0.0;
 0.0   1.0   0.0   0.0   0.0  -0.39700 0.0   
0.0   0.0  -0.73337   0.0   0.0 0.0  -0.84287   
0.0   0.0;
 0.0   1.0   0.0   0.0   0.0  -0.74935 0.0   
0.0   0.0   0.91963   0.0   0.0 0.0  -0.82284   
0.0   0.0;
 1.0   0.0   0.0   0.0  -1.45403   0.0 0.0   
0.0  -0.32012   0.0   0.0   0.0 0.17882   0.0   
0.0   0.0;
 0.0   1.0   0.0   0.0   0.0  -0.57318 0.0   
0.0   0.0   0.91963   0.0   0.0 0.0   0.33908   
0.0   0.0;
 0.0   0.0   1.0   0.0   0.0   0.0 1.71704   
0.0   0.0   0.0   0.09313   0.0 0.0   0.0 
 -0.02652   0.0;
 0.0   0.0   0.0   1.0   0.0   0.0 0.0   
0.66002   0.0   0.0   0.0  -0.11350 0.0   0.0   
0.0   0.46929;
 0.0   0.0   0.0   1.0   0.0   0.0 0.0   
0.48385   0.0   0.0   0.0  -0.94000 0.0   0.0   
0.0   1.23055;
 0.0   0.0   0.0   1.0   0.0   0.0 0.0   
0.83619   0.0   0.0   0.0  -2.38637 0.0   0.0   
0.0  -0.90297;
 0.0   1.0   0.0   0.0   0.0  -0.04466 0.0   
0.0   0.0   0.91963   0.0   0.0 0.0   0.28399   
0.0   0.0;
 0.0   1.0   0.0   0.0   0.0   0.48385 0.0   
0.0   0.0   0.91963   0.0   0.0 0.0   0.86996   
0.0   0.0;
 0.0   0.0   0.0   1.0   0.0   0.0 0.0   
1.18853   0.0   0.0   0.0   0.91963 0.0   0.0   
0.0   0.18883;
 0.0   1.0   0.0   0.0   0.0  -2.15871 0.0   
0.0   0.0  -0.94000   0.0   0.0 0.0   1.53105   
0.0   0.0;
 1.0   0.0   0.0   0.0  -1.98254   0.0 0.0   
0.0   0.50638   0.0   0.0   0.0 0.73974   0.0   
0.0   0.0;
 0.0   1.0   0.0   0.0   0.0  -1.45403 0.0   
0.0   0.0   0.50638   0.0   0.0 0.0   0.23391   
0.0   0.0;
 0.0   1.0   0.0   0.0   0.0   0.13151 0.0   
0.0   0.0   0.91963   0.0   0.0 0.0  -0.91298   
0.0   0.0;
 0.0   0.0   0.0   1.0   0.0   0.0 0.0 
 -1.63020   0.0   0.0   0.0   0.09313 0.0   0.0   
0.0   0.78982;
 0.0   1.0   0.0   0.0   0.0   0.66002 0.0   
0.0   0.0  -1.55987   0.0   0.0 0.0  -0.15173   
0.0   0.0;
 1.0   0.0   0.0   0.0   1.54087   0.0 0.0   
0.0  -0.32012   0.0   0.0   0.0 1.28564   0.0   
0.0   0.0;
 0.0   0.0   1.0   0.0   0.0   0.0 0.30768   
0.0   0.0   0.0  -0.94000   0.0 0.0   0.0 
 -0.76775   0.0;
 0.0   0.0   0.0   1.0   0.0   0.0 0.0   
1.71704   0.0   0.0   0.0   0.50638 0.0   0.0   
0.0   1.41085;
 0.0   0.0   0.0   1.0   0.0   0.0 0.0   
0.48385   0.0   0.0   0.0  -0.52675 0.0   0.0   
0.0   0.73974;
 1.0   0.0   0.0   0.0  -0.92552   0.0 0.0   
0.0   1.53950   0.0   0.0   0.0  -0.76274   0.0   
0.0   0.0;
 1.0   0.0   0.0   0.0   0.66002   0.0 0.0   
0.0   0.91963   0.0   0.0   0.0  -0.50731   0.0   
0.0   0.0;
 0.0   1.0   0.0   0.0   0.0  -0.39700 0.0   
0.0   0.0  -0.94000   0.0   0.0 0.0  -0.93803   
0.0   0.0;
 1.0   0.0   0.0   0.0  -0.04466   0.00

[Freesurfer] mri_glmfit ERROR: matrix is ill-conditioned or badly scaled -

2020-05-12 Thread Marina Fernández
External Email - Use Caution

Dear Freesurfer experts,

I get the error that you can find at the end of this message when I am
running mri_glmfit.

Whenever I run an analysis in which the experimental design has more than
12 columns, I get the same error, whereas if the experimental design has
less than 12 columns, the analysis is successful.

I also send you the fsgd.txt file (through FTP File Exchange). In this file
you can see that there are four groups that have been created by the
combination of two discrete variables (sex and apoe-type).

How can I solve this problem?

Thank you in advance.



ERROR MESSAGE:
(...)

Saving design matrix to
/usr/local/freesurfer/subjects/amy_frapsaliva_stats/stats/cortex/cortex_caseageeducfrap/pruebax_frapsalgroup_NEG/lh.fsgd_subj_gauss001/Xg.dat
Computing normalized matrix
Normalized matrix condition is 1e+08
Design matrix --
 0.0   1.0   0.0   0.0   0.0   0.83619   0.0
0.0   0.0   0.91963   0.0   0.0   0.0   0.79984
0.0   0.0;
 0.0   1.0   0.0   0.0   0.0  -0.39700   0.0
0.0   0.0  -0.73337   0.0   0.0   0.0  -0.84287
0.0   0.0;
 0.0   1.0   0.0   0.0   0.0  -0.74935   0.0
0.0   0.0   0.91963   0.0   0.0   0.0  -0.82284
0.0   0.0;
 1.0   0.0   0.0   0.0  -1.45403   0.0   0.0
0.0  -0.32012   0.0   0.0   0.0   0.17882   0.0
0.0   0.0;
 0.0   1.0   0.0   0.0   0.0  -0.57318   0.0
0.0   0.0   0.91963   0.0   0.0   0.0   0.33908
0.0   0.0;
 0.0   0.0   1.0   0.0   0.0   0.0   1.71704
0.0   0.0   0.0   0.09313   0.0   0.0   0.0
 -0.02652   0.0;
 0.0   0.0   0.0   1.0   0.0   0.0   0.0
0.66002   0.0   0.0   0.0  -0.11350   0.0   0.0
0.0   0.46929;
 0.0   0.0   0.0   1.0   0.0   0.0   0.0
0.48385   0.0   0.0   0.0  -0.94000   0.0   0.0
0.0   1.23055;
 0.0   0.0   0.0   1.0   0.0   0.0   0.0
0.83619   0.0   0.0   0.0  -2.38637   0.0   0.0
0.0  -0.90297;
 0.0   1.0   0.0   0.0   0.0  -0.04466   0.0
0.0   0.0   0.91963   0.0   0.0   0.0   0.28399
0.0   0.0;
 0.0   1.0   0.0   0.0   0.0   0.48385   0.0
0.0   0.0   0.91963   0.0   0.0   0.0   0.86996
0.0   0.0;
 0.0   0.0   0.0   1.0   0.0   0.0   0.0
1.18853   0.0   0.0   0.0   0.91963   0.0   0.0
0.0   0.18883;
 0.0   1.0   0.0   0.0   0.0  -2.15871   0.0
0.0   0.0  -0.94000   0.0   0.0   0.0   1.53105
0.0   0.0;
 1.0   0.0   0.0   0.0  -1.98254   0.0   0.0
0.0   0.50638   0.0   0.0   0.0   0.73974   0.0
0.0   0.0;
 0.0   1.0   0.0   0.0   0.0  -1.45403   0.0
0.0   0.0   0.50638   0.0   0.0   0.0   0.23391
0.0   0.0;
 0.0   1.0   0.0   0.0   0.0   0.13151   0.0
0.0   0.0   0.91963   0.0   0.0   0.0  -0.91298
0.0   0.0;
 0.0   0.0   0.0   1.0   0.0   0.0   0.0
 -1.63020   0.0   0.0   0.0   0.09313   0.0   0.0
0.0   0.78982;
 0.0   1.0   0.0   0.0   0.0   0.66002   0.0
0.0   0.0  -1.55987   0.0   0.0   0.0  -0.15173
0.0   0.0;
 1.0   0.0   0.0   0.0   1.54087   0.0   0.0
0.0  -0.32012   0.0   0.0   0.0   1.28564   0.0
0.0   0.0;
 0.0   0.0   1.0   0.0   0.0   0.0   0.30768
0.0   0.0   0.0  -0.94000   0.0   0.0   0.0
 -0.76775   0.0;
 0.0   0.0   0.0   1.0   0.0   0.0   0.0
1.71704   0.0   0.0   0.0   0.50638   0.0   0.0
0.0   1.41085;
 0.0   0.0   0.0   1.0   0.0   0.0   0.0
0.48385   0.0   0.0   0.0  -0.52675   0.0   0.0
0.0   0.73974;
 1.0   0.0   0.0   0.0  -0.92552   0.0   0.0
0.0   1.53950   0.0   0.0   0.0  -0.76274   0.0
0.0   0.0;
 1.0   0.0   0.0   0.0   0.66002   0.0   0.0
0.0   0.91963   0.0   0.0   0.0  -0.50731   0.0
0.0   0.0;
 0.0   1.0   0.0   0.0   0.0  -0.39700   0.0
0.0   0.0  -0.94000   0.0   0.0   0.0  -0.93803
0.0   0.0;
 1.0   0.0   0.0   0.0  -0.04466   0.0   0.0
0.0   0.29975   0.0   0.0   0.0  -1.07325   0.0
0.0   0.0;
 0.0   1.0   0.0

Re: [Freesurfer] mri_glmfit error: Matrix is ill-conditioned or badly scaled

2016-07-18 Thread Douglas N Greve
It does not look like the variables are demeaned (your FSGD file below)

Variables Age eTIV EnglishParityRT
Input Math_5001m Monolingual_male 18 1865790.30866 -8952.208
Input Math_5002m Monolingual_female 19 1520429.68796 -4605.208
Input Math_5003m Monolingual_male 19 1749716.72939 -39407.208333
Input Math_5004m Monolingual_female 18 1589109.27022 -17967.208333
Input Math_5005m Monolingual_male 21 1472295.15211 19531.791667
Input Math_5006m Monolingual_male 18 1580381.40566 -17027.208333
Input Math_5007m Monolingual_male 20 1813373.55024 16152.791667
Input Math_5008m Monolingual_male 21 1638616.48007 -9074.208
Input Math_5009m Monolingual_female 21 1297920.49281 61860.791667
Input Math_5010m Monolingual_female 18 1634762.57845 -22671.208333
Input Math_5011m Monolingual_female 21 1602611.42141 12763.791667
Input Math_5014m Monolingual_male 21 1632452.66476 9395.2916669


On 07/18/2016 01:31 PM, Jennifer Legault wrote:
> Hi Doug,
>
> Thank you for your response.  The current fsgd file I sent you was 
> with the covariates demeaned x 100, as I saw you recommend that to 
> someone else.  We previously tried doing just the demeaned values 
> without multiplying by 100, and that still had the badly scaled 
> error.  Do you think we should take the demeaned x 100 covariates and 
> divide them by the standard deviation?  Or would it be better to take 
> regular demeaned values and divide them by the standard deviation?
>
> Best,
>
> Jennifer Legault
>
> On Mon, Jul 18, 2016 at 12:43 PM, Douglas N Greve 
> mailto:gr...@nmr.mgh.harvard.edu>> wrote:
>
> 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
>
> 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 faces327680
> > 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
> > us

Re: [Freesurfer] mri_glmfit error: Matrix is ill-conditioned or badly scaled

2016-07-18 Thread Jennifer Legault
Hi Doug,

Thank you for your response.  The current fsgd file I sent you was with the
covariates demeaned x 100, as I saw you recommend that to someone else.  We
previously tried doing just the demeaned values without multiplying by 100,
and that still had the badly scaled error.  Do you think we should take the
demeaned x 100 covariates and divide them by the standard deviation?  Or
would it be better to take regular demeaned values and divide them by the
standard deviation?

Best,

Jennifer Legault

On Mon, Jul 18, 2016 at 12:43 PM, Douglas N Greve  wrote:

> 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
>
> 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 faces327680
> > 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  

Re: [Freesurfer] mri_glmfit error: Matrix is ill-conditioned or badly scaled

2016-07-18 Thread Douglas N Greve
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

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 faces327680
> 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/s

[Freesurfer] mri_glmfit error: Matrix is ill-conditioned or badly scaled

2016-07-11 Thread Jennifer Legault
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 faces327680
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


fsgd_math_mono_EnglishParityRT_age_gender_TIV_demean100.fsgd
Description: Binary data
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


The

Re: [Freesurfer] mri_glmfit error: matrix is ill-conditioned or badly scaled, condno = 1e+08

2014-12-12 Thread lindsay hanford
Thank you Doug! I replaced all my spaces with new spaces and it worked!
Much appreciated!

Lindsay

On Fri, Dec 12, 2014 at 12:09 PM, lindsay hanford  wrote:
>
> Hi Doug!
>
> Thank you very much for your reply. I made the fsgd file in a plain-text
> file using the textedit program on a Mac and when that didn't work I tried
> modifying in the terminal window using: nano -w g4v1.73.fsgd.
> This also didn't solve the problem. I am not sure what to try next.
>
> Lindsay
>
> On Thu, Dec 11, 2014 at 9:09 AM, lindsay hanford <
> lindsay.hanf...@gmail.com> wrote:
>>
>> Hello,
>>
>> Has anyone had a chance to look at this? I still haven't been able to
>> solve the problem.
>> Thanks!
>>
>> Lindsay
>>
>> On Mon, Dec 1, 2014 at 2:41 PM, lindsay hanford <
>> lindsay.hanf...@gmail.com> wrote:
>>
>>> Hello Freesurfer Experts!
>>>
>>> I am encountering the dreaded mri_glmfit error:  matrix is
>>> ill-conditioned or badly scaled, condno = 1e+08. I have tried to
>>> troubleshoot how to solve this problem from other inquiries, however, I
>>> still have had no luck. I am trying to run a 4 group 1 variable analysis:
>>> with diagnosis being my variable of interest and trying to regress out the
>>> effects of sex and age.
>>>
>>>   1. Command line:
>>> mri_glmfit --y lh.10.73.SZHC.mgh --fsgd g4v1.73.fsgd dods --C
>>> SZ-HC.intercept.73.mtx --surf fsaverage lh --cortex --glmdir g4v1.73.lh
>>>   2. The FSGD file (if using one) (see attached)
>>>   3. And the design matrix:
>>>0.5 0.5 -0.5 -0.5 0 0 0 0 (or see attached)
>>>
>>> To the best of my knowledge, all my files are the right format and I
>>> believe I have adequate number of participants per group?
>>> I also tried mean centering my age variable. I had success when I ran
>>> just a two group analysis (diagnosis) not controlling for sex or age,
>>> however, as soon as I try to run four groups, I encounter this error. I
>>> have no idea how to proceed.
>>>
>>> I am looking forward to your response!
>>> Thanks,
>>>
>>>
>>> Lindsay
>>>
>>> --
>>> Lindsay Hanford, BSc, PhD Candidate
>>> McMaster Integrative Neuroscience Discovery & Study | *Department of
>>> Psychology, Neuroscience & Behaviour *
>>> McMaster University *|* 1280 Main Street West, PC329 Psychology
>>> Building *|* Hamilton, ON, L8S 4L8
>>> 905 525 9140 x24784 *|* lindsay.hanf...@gmail.com
>>>
>>
>>
>
> --
> Lindsay Hanford, BSc, PhD Candidate
> McMaster Integrative Neuroscience Discovery & Study | *Department of
> Psychology, Neuroscience & Behaviour *
> McMaster University *|* 1280 Main Street West, PC329 Psychology Building
> *|* Hamilton, ON, L8S 4L8
> 905 525 9140 x24784 *|* lindsay.hanf...@gmail.com
>


-- 
Lindsay Hanford, BSc, PhD Candidate
McMaster Integrative Neuroscience Discovery & Study | *Department of
Psychology, Neuroscience & Behaviour *
McMaster University *|* 1280 Main Street West, PC329 Psychology Building *|*
 Hamilton, ON, L8S 4L8
905 525 9140 x24784 *|* lindsay.hanf...@gmail.com
___
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.


Re: [Freesurfer] mri_glmfit error: matrix is ill-conditioned or badly scaled, condno = 1e+08

2014-12-12 Thread Douglas N Greve

The file I looked at had a bunch of carriage returns (try looking at it 
with more or less or cat). As long as those are in there, it will create 
an error.

Try running this and using the new one
cat g4v1.73.fsgd | sed 's/\r/\n/g' > new.g4v1.73.fsgd

On 12/12/2014 12:09 PM, lindsay hanford wrote:
> Hi Doug!
>
> Thank you very much for your reply. I made the fsgd file in a 
> plain-text file using the textedit program on a Mac and when that 
> didn't work I tried modifying in the terminal window using: nano -w 
> g4v1.73.fsgd.
> This also didn't solve the problem. I am not sure what to try next.
>
> Lindsay
>
> On Thu, Dec 11, 2014 at 9:09 AM, lindsay hanford 
> mailto:lindsay.hanf...@gmail.com>> wrote:
>
> Hello,
>
> Has anyone had a chance to look at this? I still haven't been able
> to solve the problem.
> Thanks!
>
> Lindsay
>
> On Mon, Dec 1, 2014 at 2:41 PM, lindsay hanford
> mailto:lindsay.hanf...@gmail.com>> wrote:
>
> Hello Freesurfer Experts!
>
> I am encountering the dreaded mri_glmfit error:  matrix is
> ill-conditioned or badly scaled, condno = 1e+08. I have tried
> to troubleshoot how to solve this problem from other
> inquiries, however, I still have had no luck. I am trying to
> run a 4 group 1 variable analysis: with diagnosis being my
> variable of interest and trying to regress out the effects of
> sex and age.
>
>   1. Command line:
> mri_glmfit --y lh.10.73.SZHC.mgh --fsgd g4v1.73.fsgd dods
> --C SZ-HC.intercept.73.mtx --surf fsaverage lh --cortex
> --glmdir g4v1.73.lh
>   2. The FSGD file (if using one) (see attached)
>   3. And the design matrix:
>0.5 0.5 -0.5 -0.5 0 0 0 0 (or see attached)
>
> To the best of my knowledge, all my files are the right format
> and I believe I have adequate number of participants per group?
> I also tried mean centering my age variable. I had success
> when I ran just a two group analysis (diagnosis) not
> controlling for sex or age, however, as soon as I try to run
> four groups, I encounter this error. I have no idea how to
> proceed.
>
> I am looking forward to your response!
> Thanks,
>
>
> Lindsay
>
> -- 
> Lindsay Hanford, BSc, PhD Candidate
> McMaster Integrative Neuroscience Discovery & Study|
> *Department of Psychology, Neuroscience & Behaviour *
> McMaster University *|* 1280 Main Street West, PC329
> Psychology Building *|* Hamilton, ON, L8S 4L8
> 905 525 9140 x24784
> ***|*lindsay.hanf...@gmail.com
> 
>
>
>
>
> -- 
> Lindsay Hanford, BSc, PhD Candidate
> McMaster Integrative Neuroscience Discovery & Study| *Department of 
> Psychology, Neuroscience & Behaviour *
> McMaster University *|* 1280 Main Street West, PC329 Psychology 
> Building *|* Hamilton, ON, L8S 4L8
> 905 525 9140 x24784***|*lindsay.hanf...@gmail.com 
> 
>
>
> ___
> 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
gr...@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.



Re: [Freesurfer] mri_glmfit error: matrix is ill-conditioned or badly scaled, condno = 1e+08

2014-12-12 Thread lindsay hanford
Hi Doug!

Thank you very much for your reply. I made the fsgd file in a plain-text
file using the textedit program on a Mac and when that didn't work I tried
modifying in the terminal window using: nano -w g4v1.73.fsgd.
This also didn't solve the problem. I am not sure what to try next.

Lindsay

On Thu, Dec 11, 2014 at 9:09 AM, lindsay hanford 
wrote:
>
> Hello,
>
> Has anyone had a chance to look at this? I still haven't been able to
> solve the problem.
> Thanks!
>
> Lindsay
>
> On Mon, Dec 1, 2014 at 2:41 PM, lindsay hanford  > wrote:
>
>> Hello Freesurfer Experts!
>>
>> I am encountering the dreaded mri_glmfit error:  matrix is
>> ill-conditioned or badly scaled, condno = 1e+08. I have tried to
>> troubleshoot how to solve this problem from other inquiries, however, I
>> still have had no luck. I am trying to run a 4 group 1 variable analysis:
>> with diagnosis being my variable of interest and trying to regress out the
>> effects of sex and age.
>>
>>   1. Command line:
>> mri_glmfit --y lh.10.73.SZHC.mgh --fsgd g4v1.73.fsgd dods --C
>> SZ-HC.intercept.73.mtx --surf fsaverage lh --cortex --glmdir g4v1.73.lh
>>   2. The FSGD file (if using one) (see attached)
>>   3. And the design matrix:
>>0.5 0.5 -0.5 -0.5 0 0 0 0 (or see attached)
>>
>> To the best of my knowledge, all my files are the right format and I
>> believe I have adequate number of participants per group?
>> I also tried mean centering my age variable. I had success when I ran
>> just a two group analysis (diagnosis) not controlling for sex or age,
>> however, as soon as I try to run four groups, I encounter this error. I
>> have no idea how to proceed.
>>
>> I am looking forward to your response!
>> Thanks,
>>
>>
>> Lindsay
>>
>> --
>> Lindsay Hanford, BSc, PhD Candidate
>> McMaster Integrative Neuroscience Discovery & Study | *Department of
>> Psychology, Neuroscience & Behaviour *
>> McMaster University *|* 1280 Main Street West, PC329 Psychology Building
>> *|* Hamilton, ON, L8S 4L8
>> 905 525 9140 x24784 *|* lindsay.hanf...@gmail.com
>>
>
>

-- 
Lindsay Hanford, BSc, PhD Candidate
McMaster Integrative Neuroscience Discovery & Study | *Department of
Psychology, Neuroscience & Behaviour *
McMaster University *|* 1280 Main Street West, PC329 Psychology Building *|*
 Hamilton, ON, L8S 4L8
905 525 9140 x24784 *|* lindsay.hanf...@gmail.com
___
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.


Re: [Freesurfer] mri_glmfit error: matrix is ill-conditioned or badly scaled, condno = 1e+08

2014-12-11 Thread Douglas N Greve

Your FSGD file appears to have been made under windows or using an 
editor that is not simple text. The contrast matrix looks ok.

doug

On 12/01/2014 02:41 PM, lindsay hanford wrote:
> Hello Freesurfer Experts!
>
> I am encountering the dreaded mri_glmfit error:  matrix is 
> ill-conditioned or badly scaled, condno = 1e+08. I have tried to 
> troubleshoot how to solve this problem from other inquiries, however, 
> I still have had no luck. I am trying to run a 4 group 1 variable 
> analysis: with diagnosis being my variable of interest and trying to 
> regress out the effects of sex and age.
>
>   1. Command line:
> mri_glmfit --y lh.10.73.SZHC.mgh --fsgd g4v1.73.fsgd dods --C 
> SZ-HC.intercept.73.mtx --surf fsaverage lh --cortex --glmdir g4v1.73.lh
>   2. The FSGD file (if using one) (see attached)
>   3. And the design matrix:
>0.5 0.5 -0.5 -0.5 0 0 0 0 (or see attached)
>
> To the best of my knowledge, all my files are the right format and I 
> believe I have adequate number of participants per group?
> I also tried mean centering my age variable. I had success when I ran 
> just a two group analysis (diagnosis) not controlling for sex or age, 
> however, as soon as I try to run four groups, I encounter this error. 
> I have no idea how to proceed.
>
> I am looking forward to your response!
> Thanks,
>
>
> Lindsay
>
> -- 
> Lindsay Hanford, BSc, PhD Candidate
> McMaster Integrative Neuroscience Discovery & Study| *Department of 
> Psychology, Neuroscience & Behaviour *
> McMaster University *|* 1280 Main Street West, PC329 Psychology 
> Building *|* Hamilton, ON, L8S 4L8
> 905 525 9140 x24784***|*lindsay.hanf...@gmail.com 
> 
>
>
> ___
> 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
gr...@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.



Re: [Freesurfer] mri_glmfit error: matrix is ill-conditioned or badly scaled, condno = 1e+08

2014-12-11 Thread lindsay hanford
Hello,

Has anyone had a chance to look at this? I still haven't been able to solve
the problem.
Thanks!

Lindsay

On Mon, Dec 1, 2014 at 2:41 PM, lindsay hanford 
wrote:

> Hello Freesurfer Experts!
>
> I am encountering the dreaded mri_glmfit error:  matrix is ill-conditioned
> or badly scaled, condno = 1e+08. I have tried to troubleshoot how to solve
> this problem from other inquiries, however, I still have had no luck. I am
> trying to run a 4 group 1 variable analysis: with diagnosis being my
> variable of interest and trying to regress out the effects of sex and age.
>
>   1. Command line:
> mri_glmfit --y lh.10.73.SZHC.mgh --fsgd g4v1.73.fsgd dods --C
> SZ-HC.intercept.73.mtx --surf fsaverage lh --cortex --glmdir g4v1.73.lh
>   2. The FSGD file (if using one) (see attached)
>   3. And the design matrix:
>0.5 0.5 -0.5 -0.5 0 0 0 0 (or see attached)
>
> To the best of my knowledge, all my files are the right format and I
> believe I have adequate number of participants per group?
> I also tried mean centering my age variable. I had success when I ran just
> a two group analysis (diagnosis) not controlling for sex or age, however,
> as soon as I try to run four groups, I encounter this error. I have no idea
> how to proceed.
>
> I am looking forward to your response!
> Thanks,
>
>
> Lindsay
>
> --
> Lindsay Hanford, BSc, PhD Candidate
> McMaster Integrative Neuroscience Discovery & Study | *Department of
> Psychology, Neuroscience & Behaviour *
> McMaster University *|* 1280 Main Street West, PC329 Psychology Building
> *|* Hamilton, ON, L8S 4L8
> 905 525 9140 x24784 *|* lindsay.hanf...@gmail.com
>
___
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.


[Freesurfer] mri_glmfit error: matrix is ill-conditioned or badly scaled, condno = 1e+08

2014-12-01 Thread lindsay hanford
Hello Freesurfer Experts!

I am encountering the dreaded mri_glmfit error:  matrix is ill-conditioned
or badly scaled, condno = 1e+08. I have tried to troubleshoot how to solve
this problem from other inquiries, however, I still have had no luck. I am
trying to run a 4 group 1 variable analysis: with diagnosis being my
variable of interest and trying to regress out the effects of sex and age.

  1. Command line:
mri_glmfit --y lh.10.73.SZHC.mgh --fsgd g4v1.73.fsgd dods --C
SZ-HC.intercept.73.mtx --surf fsaverage lh --cortex --glmdir g4v1.73.lh
  2. The FSGD file (if using one) (see attached)
  3. And the design matrix:
   0.5 0.5 -0.5 -0.5 0 0 0 0 (or see attached)

To the best of my knowledge, all my files are the right format and I
believe I have adequate number of participants per group?
I also tried mean centering my age variable. I had success when I ran just
a two group analysis (diagnosis) not controlling for sex or age, however,
as soon as I try to run four groups, I encounter this error. I have no idea
how to proceed.

I am looking forward to your response!
Thanks,


Lindsay

-- 
Lindsay Hanford, BSc, PhD Candidate
McMaster Integrative Neuroscience Discovery & Study | *Department of
Psychology, Neuroscience & Behaviour *
McMaster University *|* 1280 Main Street West, PC329 Psychology Building *|*
 Hamilton, ON, L8S 4L8
905 525 9140 x24784 *|* lindsay.hanf...@gmail.com


g4v1.73.fsgd
Description: Binary data


SZ-HC.intercept.73.mtx
Description: Binary data
___
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.