[Freesurfer] Matrix ill-conditioned

2018-06-06 Thread Guillaume Bellanger
External Email - Use Caution

Hello Freesurfer people,

I am having an issue with my matrix using QDEC (ERROR: matrix is 
ill-conditioned or badly scaled, condno = 10880.8), I have 2 discrete variables 
(Sex, Cognition) and I want to regress against 2 continuous variable (Age, 
Education). My outcome: is there a relation between  cortical thickness and 
Cognition (yes/no), accounting for Sex, Age and Education.
I attached my FSGD file and matrix.

Thanks a lot.

Guillaume


Matrix
Description: Matrix


qdec_nocortlesion.dat
Description: qdec_nocortlesion.dat
___
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] Matrix ill-conditioned error for dods thickness mri_glmfit analysis

2017-08-16 Thread Douglas N Greve
posting the response to the list: The problem is that femalezero and 
femaletwo only have 4 and 3 subjects, respectively. As you are trying to 
estimate 4 slopes + an intercept, you will need at least 5 subjects per 
group.

doug




On 08/16/2017 03:27 PM, Sullivan, Danielle Renee wrote:
>
> Hi Doug,
>
>
> I am just following up to this email. If you prefer I can repost on 
> the FreeSurfer mail archive.
>
>
> Thanks,
>
> Danielle R. Sullivan (Miller), Ph.D.
>
> National Center for PTSD
>
> VA Boston Healthcare System Jamaica Plain
>
> Boston University School of Medicine
>
> OFFICE: (857) 364-4022
>
>
> 
> *From:* Sullivan, Danielle Renee
> *Sent:* Friday, August 11, 2017 1:33:03 PM
> *To:* Douglas N Greve
> *Subject:* Re: [Freesurfer] Matrix ill-conditioned error for dods 
> thickness mri_glmfit analysis
>
> I am still getting the same error. My apologies for the back and forth.
>
>
> Here are updated files (now there are 5 classes and contrast mtx has 
> been changed to reflect that).
>
>
> Danielle R. Sullivan (Miller), Ph.D.
>
> National Center for PTSD
>
> VA Boston Healthcare System Jamaica Plain
>
> Boston University School of Medicine
>
> OFFICE: (857) 364-4022
>
>
> --------
> *From:* Douglas N Greve 
> *Sent:* Friday, August 11, 2017 1:10:53 PM
> *To:* Sullivan, Danielle Renee
> *Subject:* Re: [Freesurfer] Matrix ill-conditioned error for dods 
> thickness mri_glmfit analysis
> remove the definition too
>
>
> On 08/11/2017 12:46 PM, Sullivan, Danielle Renee wrote:
> >
> > Hi,
> >
> >
> > Thank you for the tips. I tried doing both and still run into the
> > error (although now I get a warning that the class femaleone is
> > defined but not used). Attached is my new FSGD (now all variables
> > normalized via a Z-score), XG.mtx, Contrast, and Terminal output.
> >
> >
> > Thanks again for the help!
> >
> >
> > Danielle R. Sullivan (Miller), Ph.D.
> >
> > National Center for PTSD
> >
> > VA Boston Healthcare System Jamaica Plain
> >
> > Boston University School of Medicine
> >
> > OFFICE: (857) 364-4022
> >
> >
> > 
> > *From:* Douglas N Greve 
> > *Sent:* Friday, August 11, 2017 11:12:21 AM
> > *To:* Sullivan, Danielle Renee
> > *Subject:* Re: [Freesurfer] Matrix ill-conditioned error for dods
> > thickness mri_glmfit analysis
> > there appear to be two problems. One is that you only have one instance
> > of femaleone. This might be ok if you had no covariates, but you can't
> > estimate a covariate slope from one data point. Second, the scale of
> > your covariates is much different, so you may need to normalize them. I
> > would try removing the lone femaleone and rerun
> >
> >
> > On 08/11/2017 10:35 AM, Sullivan, Danielle Renee wrote:
> > >
> > > Hi Doug,
> > >
> > >
> > > Thanks for your response and help.
> > >
> > >
> > > Attached is the matrix and the terminal output. Please let me know if
> > > you need anything else.
> > >
> > >
> > >
> > > Danielle R. Sullivan (Miller), Ph.D.
> > >
> > > National Center for PTSD
> > >
> > > VA Boston Healthcare System Jamaica Plain
> > >
> > > Boston University School of Medicine
> > >
> > > OFFICE: (857) 364-4022
> > >
> > >
> > > can you send the design matrix Xg.mtx and the full terminal output?
> > > On 08/08/2017 09:13 AM, Sullivan, Danielle Renee wrote:
> > > >
> > > > Hi FreeSurfer Experts,
> > > >
> > > >
> > > > I am trying to run a dods cortical thickness analysis examining the
> > > > interaction of group on a continuous variable while controlling for
> > > > other variables.
> > > >
> > > >
> > > > Specifically, I have 6 classes (gender by three groups [zero, one,
> > > > two]). I am interested in the group interaction with a continuous
> > > > variable while controlling for gender (among 4 other continuous
> > > > variables). I set up my fsgd file (see attached) and contrast file
> > (36
> > > > dimensions- F test):
> > > >
> > > > *0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 [1 -1
> > 0 1
> > > &g

Re: [Freesurfer] Matrix ill-conditioned error for dods thickness mri_glmfit analysis

2017-08-09 Thread Douglas N Greve
can you send the design matrix Xg.mtx and the full terminal output?


On 08/08/2017 09:13 AM, Sullivan, Danielle Renee wrote:
>
> Hi FreeSurfer Experts,
>
>
> I am trying to run a dods cortical thickness analysis examining the 
> interaction of group on a continuous variable while controlling for 
> other variables.
>
>
> Specifically, I have 6 classes (gender by three groups [zero, one, 
> two]). I am interested in the group interaction with a continuous 
> variable while controlling for gender (among 4 other continuous 
> variables). I set up my fsgd file (see attached) and contrast file (36 
> dimensions- F test):
>
> *0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 [1 -1 0 1 
> -1 0]/2*
>
> *0 0 0 0 0 0 **0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 [1 -0 
> -1 1  0 -1]/2*
>
>
> and ran this command:
>
>
> *mri_glmfit --y 
> **lh.age.PC1_forFSGD.PC2_forFSGD.PC3_forFSGD.GGT_forFSGD.rs8042149_A_bysex_forfsgd.thickness.10.mgh
>  
> --fsgd 
> fsgd.age.PC1_forFSGD.PC2_forFSGD.PC3_forFSGD.GGT_forFSGD.rs8042149_A_bysex_forFSGD.152.thickness.08082017.txt
>  
> dods --C 
> /GLM_CONTRAST.MAT/Contrast.Male.Female.Age.PC1.PC2.PC3.GGT.RORAbySex.mtx 
> --surf fsaverage lh --cortex --glmdir 
> lh.age.PC1_forFSGD.PC2_forFSGD.PC3_forFSGD.GGT_forFSGD.rs8042149_A_bysex_forfsgd.thickness.10.glmdir
>  
> *
>
>
> But keep getting this error:
>
>
> *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.*
>
> *If you seek help with this problem, make sure to send:*
>
> *  1. Your command line:*
>
> *mri_glmfit --y 
> lh.age.PC1_forFSGD.PC2_forFSGD.PC3_forFSGD.GGT_forFSGD.rs8042149_A_bysex_forfsgd.thickness.10.mgh
>  
> --fsgd 
> fsgd.age.PC1_forFSGD.PC2_forFSGD.PC3_forFSGD.GGT_forFSGD.rs8042149_A_bysex_forFSGD.152.thickness.08082017.txt
>  
> dods --C 
> /Volumes/VA_Imaging/Projects/salat/2389_TRT/dmiller/GGT_CRP/GLM_CONTRAST.MAT/Contrast.Male.Female.Age.PC1.PC2.PC3.GGT.RORAbySex.mtx
>  
> --surf fsaverage lh --cortex --glmdir 
> lh.age.PC1_forFSGD.PC2_forFSGD.PC3_forFSGD.GGT_forFSGD.rs8042149_A_bysex_forfsgd.thickness.10.glmdir
>  
> *
>
> *  2. The FSGD file (if using one)*
>
> *  3. And the design matrix above*
>
>
>
> Any idea on what I am doing wrong?
>
>
> Danielle R. Miller, Ph.D.
>
> National Center for PTSD
>
> VA Boston Healthcare System Jamaica Plain
>
> Boston University School of Medicine
>
> OFFICE: (857) 364-4022
>
>
>
>
> ___
> 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.



[Freesurfer] Matrix ill-conditioned error for dods thickness mri_glmfit analysis

2017-08-08 Thread Sullivan, Danielle Renee
Hi FreeSurfer Experts,


I am trying to run a dods cortical thickness analysis examining the interaction 
of group on a continuous variable while controlling for other variables.


Specifically, I have 6 classes (gender by three groups [zero, one, two]). I am 
interested in the group interaction with a continuous variable while 
controlling for gender (among 4 other continuous variables). I set up my fsgd 
file (see attached) and contrast file (36 dimensions- F test):

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 [1 -1 0 1 -1 0]/2

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 [1 -0 -1 1  0 -1]/2


and ran this command:


mri_glmfit --y  
lh.age.PC1_forFSGD.PC2_forFSGD.PC3_forFSGD.GGT_forFSGD.rs8042149_A_bysex_forfsgd.thickness.10.mgh
 --fsgd 
fsgd.age.PC1_forFSGD.PC2_forFSGD.PC3_forFSGD.GGT_forFSGD.rs8042149_A_bysex_forFSGD.152.thickness.08082017.txt
 dods --C 
/GLM_CONTRAST.MAT/Contrast.Male.Female.Age.PC1.PC2.PC3.GGT.RORAbySex.mtx --surf 
fsaverage lh --cortex --glmdir 
lh.age.PC1_forFSGD.PC2_forFSGD.PC3_forFSGD.GGT_forFSGD.rs8042149_A_bysex_forfsgd.thickness.10.glmdir


But keep getting this error:


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.

If you seek help with this problem, make sure to send:

  1. Your command line:

mri_glmfit --y 
lh.age.PC1_forFSGD.PC2_forFSGD.PC3_forFSGD.GGT_forFSGD.rs8042149_A_bysex_forfsgd.thickness.10.mgh
 --fsgd 
fsgd.age.PC1_forFSGD.PC2_forFSGD.PC3_forFSGD.GGT_forFSGD.rs8042149_A_bysex_forFSGD.152.thickness.08082017.txt
 dods --C 
/Volumes/VA_Imaging/Projects/salat/2389_TRT/dmiller/GGT_CRP/GLM_CONTRAST.MAT/Contrast.Male.Female.Age.PC1.PC2.PC3.GGT.RORAbySex.mtx
 --surf fsaverage lh --cortex --glmdir 
lh.age.PC1_forFSGD.PC2_forFSGD.PC3_forFSGD.GGT_forFSGD.rs8042149_A_bysex_forfsgd.thickness.10.glmdir

  2. The FSGD file (if using one)

  3. And the design matrix above



Any idea on what I am doing wrong?

Danielle R. Miller, Ph.D.
National Center for PTSD
VA Boston Healthcare System Jamaica Plain
Boston University School of Medicine
OFFICE: (857) 364-4022

GroupDescriptorFile 1
Title 
fsgd.age.PC1_forFSGD.PC2_forFSGD.PC3_forFSGD.GGT_forFSGD.rs8042149_A_bysex_forFSGD.152.thickness.08082017.txt
MeasurementName thickness

Class femalezero
Class femaleone
Class femaletwo
Class malezero
Class maleone
Class maletwo

Variables age PC1_forFSGD PC2_forFSGD PC3_forFSGD GGT_forFSGD

#Input TRT_0007 = 43 = = = =
#Input TRT_0015 = 38 = = = =
#Input TRT_0016 femalezero 47 0.0295 -0.1271 0.0693 =
#Input TRT_0017 maleone 29 0.0583 0.1283 -0.0139 =
#Input TRT_0019 = 43 = = = =
#Input TRT_0020 = 28 = = = =
#Input TRT_0022 malezero 23 0.0324 0.0381 0.0355 =
#Input TRT_0025 maletwo 24 -0.0619 -0.0585 -0.0010 =
#Input TRT_0026 maleone 26 0.0344 0.1225 0.0991 =
#Input TRT_0027 femaletwo 43 -0.0417 0.0989 0.0776 =
#Input TRT_0028 = 37 = = = =
#Input TRT_0030 maleone 23 0.0230 0.0637 0.0496 =
#Input TRT_0031 maleone 19 -0.0498 0.0925 -0.0851 =
#Input TRT_0032 femalezero 25 -0.0151 -0.0589 -0.0538 =
#Input TRT_0033 malezero 24 0.0675 -0.1426 0.0793 =
#Input TRT_0034 maletwo 39 -0.0826 0.0282 0.0109 =
#Input TRT_0035 maletwo 32 0.1583 -0.0853 -0.0525 =
#Input TRT_0036 maleone 49 0.1116 -0.0184 -0.0206 =
#Input TRT_0037 malezero 27 0.0836 0.0867 0.0418 =
#Input TRT_0038 = 44 = = = =
Input TRT_0042 malezero 20 0.0775 0.0252 0.0351 15
#Input TRT_0043 maleone 49 -0.0615 -0.0789 0.0855 =
#Input TRT_0045 malezero 38 -0.0078 -0.0248 -0.0194 =
#Input TRT_0047 maletwo 26 -0.0431 -0.0585 -0.0031 =
#Input TRT_0048 = 31 = = = 28
#Input TRT_0049 femaletwo 23 -0.0237 0.0189 -0.0160 =
#Input TRT_0050 = 32 = = = =
#Input TRT_0051 = 43 = = = =
#Input TRT_0052 malezero 29 -0.0980 0.0265 0.1271 =
#Input TRT_0055 malezero 33 0.1757 0.0140 -0.0469 =
Input TRT_0057 maletwo 26 0.1976 0.0419 -0.0359 32
#Input TRT_0058 = 58 = = = 10
Input TRT_0059 malezero 42 -0.0061 0.1113 -0.0729 29
#Input TRT_0060 = 37 = = = 33
Input TRT_0061 maleone 34 0.0508 -0.0194 0.0931 22
Input TRT_0062 maletwo 42 -0.1008 -0.1552 0.0298 46
#Input TRT_0063 maleone 46 -0.0077 -0.0068 0.0540 =
Input TRT_0064 maleone 47 0.0792 -0.1128 0.1746 13
Input TRT_0065 maletwo 55 -0.0489 -0.1078 0.0532 65
#Input TRT_0066 = 35 = = = 26
Input TRT_0067 maleone 40 -0.0759 0.0753 -0.0375 24
Input TRT_0068 maleone 24 -0.1071 0.0256 -0.0220 48
#Input TRT_0069 = 44 = = = 26
Input TRT_0070 maleone 47 -0.0551 0.0043 0.0556 29
Input TRT_0071 malezero 28 0.0037 -0.0156 0.0113 19
Input TRT_0072 malezero 31 0.0855 -0.0362 -0.0036 20
Input TRT_0073 malezero 21 -0.0363 0.0048 0.0014 56
Input TRT_0075 maletwo 42 -0.0713 0.0286 -0.1274 30
Input TRT_0076 malezero 33 0.0995 -0.0306 0.0634 23
Input TRT_0078 maleone 39 0.1166 -0.1302 -0.0220 19
Input TRT_0079 maletwo 33 -0.0696 0.0533 -0.0207 24
Input TRT_0082 malezero 58 0.0669 -0.0484 -0.1014 54
Input TRT_

Re: [Freesurfer] matrix ill-conditioned....

2013-08-28 Thread Douglas N Greve

In general, you should not need to demean. For the interaction, you need 
to demean before computing the interaction.
doug



On 08/28/2013 07:54 AM, Jacobs H (NP) wrote:
> Hi Doug,
>
> Thanks! I actually thought I only had to demean variables that were not of 
> interest.
> But this was indeed the problem, it now works!
>
> Thank you very much!
> Best
> Heidi
> 
> Dr. Heidi Jacobs
> Postdoc researcher
> Faculty of Health, Medicine and Life Sciences
> School for Mental Health and Neurosciences
> Division Cognitive Neuropsychiatry and Clinical Neurosciences
> Alzheimer Center Limburg
> h.jac...@maastrichtuniversity.nl
> www.maastrichtuniversity.nl
> www.heidijacobs.nl
>
> Dr. Tanslaan 12, 6229 ET Maastricht
> P.O. Box 616, 6200 MD Maastricht, The Netherlands
> T +31 43 38 84 090 F +31 43 38 84 092
> 
> 
> Van: Douglas N Greve [gr...@nmr.mgh.harvard.edu]
> Verzonden: dinsdag 27 augustus 2013 18:27
> Aan: Jacobs H (NP)
> CC: freesurfer@nmr.mgh.harvard.edu
> Onderwerp: Re: matrix ill-conditioned
>
> Hi Heidi, the problem is being caused by the interaction column. Try
> demeaning the ed_log and MMSE before multiplying them together to get
> the interaction. Do the demeaning on the entire data set, not on a group
> by group basis.
> doug
>
>
>
>
>
>
> On 08/27/2013 02:04 AM, Jacobs H (NP) wrote:
>> Sure, here it is.
>> Thanks
>> Heidi
>> 
>> Dr. Heidi Jacobs
>> Postdoc researcher
>> Faculty of Health, Medicine and Life Sciences
>> School for Mental Health and Neurosciences
>> Division Cognitive Neuropsychiatry and Clinical Neurosciences
>> Alzheimer Center Limburg
>> h.jac...@maastrichtuniversity.nl
>> www.maastrichtuniversity.nl
>> www.heidijacobs.nl
>>
>> Dr. Tanslaan 12, 6229 ET Maastricht
>> P.O. Box 616, 6200 MD Maastricht, The Netherlands
>> T +31 43 38 84 090 F +31 43 38 84 092
>> 
>> 
>> Van: Douglas N Greve [gr...@nmr.mgh.harvard.edu]
>> Verzonden: maandag 26 augustus 2013 23:53
>> Aan: Jacobs H (NP)
>> CC: freesurfer@nmr.mgh.harvard.edu
>> Onderwerp: Re: matrix ill-conditioned
>>
>> Can you send me the design matrix (Xg.dat) and fsgd file?
>>
>>
>> On 08/26/2013 04:35 PM, Jacobs H (NP) wrote:
>>> Dear Doug,
>>>
>>> Thank you. I tried to run it with this version of mri_glmfit (saved as 
>>> mri_glmfit2), but it still gives me the same error message.
>>> I don't see the problem. I already divided the column with the interaction 
>>> by 10.
>>> Fsgd files without MMSE and interaction factors, did not gave a problem...
>>> Could you have a look at it? I will attach the fsgd and contrast file.
>>>
>>> Thanks! I really appreciate your help!
>>> Heidi
>>>
>>>
>>> 
>>> ERROR: matrix is ill-conditioned or badly scaled, condno = 101281
>>> 
>>> 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_glmfit2 --y 
>>> rh.Alls_educlog_MMSE_inter_agecent_ICVcent_fsgd.sm20.mgh --fsgd 
>>> /media/Data_disk/Nieuwe_map/FreeSurferOutputAD/FreeSurferOutputv450/FSGD/fsgd.Alls_educlog_MMSE_inter_agecent_ICVcent_fsgd.txt
>>>  dods --glmdir 
>>> rh.Alls_educlog_MMSE_inter_agecent_ICVcent_fsgd.dods.20.glmdir --surf 
>>> fsaverage rh --C 
>>> /media/Data_disk/Nieuwe_map/FreeSurferOutputAD/FreeSurferOutputv450/GLM_CONTRAST.MAT/contrast_3groups_Finteraction.mat
>>>  2. The FSGD file (if using one)
>>>  3. And the design matrix above
>>>
>>>
>>> 
>>> Dr. Heidi Jacobs
>>> Postdoc researcher
>>> Faculty of Health, Medicine and Life Sciences
>>> School for Mental Health and Neurosciences
>>> Division Cognitive Neuropsychiatry and Clinical Neurosciences
>>> Alzheimer Center Limburg
>>> h.jac...@maastrichtuniversity.nl
>>> www.maastrichtuniversity.nl
>>> www.heidijacobs.nl
>>>
>>> Dr. Tanslaan 12, 6229 ET Maastricht
>>> P.O. Box 616, 6200 MD Maastricht, The Netherlands
>>> T +31 43 38 84 090 F +31 43 38 84 092
>>> 
>>> 
>>> Van: Douglas N Greve [gr...@nmr.mgh.harvard.edu]
>>> Verzonden: maandag 26 augustus 2013 21:47
>>> Aan: Jacobs H (NP)
>>> CC: freesurfer@nmr.mgh.harvard.edu
>>> Onderwerp: Re: matrix ill-conditioned
>>>
>>> You can try with this version of mri_glmfit which will do the rescaling
>>> for you
>>> ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/mri_glmfit
>>>
>>> If the problem persists then it may be an issue with your design
>>>
>>> doug
>>>
>>>
>>> On 08/26/2013 01:42 PM, Jacobs H (NP) wrote:
 Hi Doug,

 I divided everythi

Re: [Freesurfer] matrix ill-conditioned....

2013-08-28 Thread Jacobs H (NP)
Hi Doug,

Thanks! I actually thought I only had to demean variables that were not of 
interest.
But this was indeed the problem, it now works!

Thank you very much!
Best
Heidi

Dr. Heidi Jacobs
Postdoc researcher
Faculty of Health, Medicine and Life Sciences
School for Mental Health and Neurosciences
Division Cognitive Neuropsychiatry and Clinical Neurosciences
Alzheimer Center Limburg
h.jac...@maastrichtuniversity.nl
www.maastrichtuniversity.nl
www.heidijacobs.nl

Dr. Tanslaan 12, 6229 ET Maastricht
P.O. Box 616, 6200 MD Maastricht, The Netherlands
T +31 43 38 84 090 F +31 43 38 84 092


Van: Douglas N Greve [gr...@nmr.mgh.harvard.edu]
Verzonden: dinsdag 27 augustus 2013 18:27
Aan: Jacobs H (NP)
CC: freesurfer@nmr.mgh.harvard.edu
Onderwerp: Re: matrix ill-conditioned

Hi Heidi, the problem is being caused by the interaction column. Try
demeaning the ed_log and MMSE before multiplying them together to get
the interaction. Do the demeaning on the entire data set, not on a group
by group basis.
doug






On 08/27/2013 02:04 AM, Jacobs H (NP) wrote:
> Sure, here it is.
> Thanks
> Heidi
> 
> Dr. Heidi Jacobs
> Postdoc researcher
> Faculty of Health, Medicine and Life Sciences
> School for Mental Health and Neurosciences
> Division Cognitive Neuropsychiatry and Clinical Neurosciences
> Alzheimer Center Limburg
> h.jac...@maastrichtuniversity.nl
> www.maastrichtuniversity.nl
> www.heidijacobs.nl
>
> Dr. Tanslaan 12, 6229 ET Maastricht
> P.O. Box 616, 6200 MD Maastricht, The Netherlands
> T +31 43 38 84 090 F +31 43 38 84 092
> 
> 
> Van: Douglas N Greve [gr...@nmr.mgh.harvard.edu]
> Verzonden: maandag 26 augustus 2013 23:53
> Aan: Jacobs H (NP)
> CC: freesurfer@nmr.mgh.harvard.edu
> Onderwerp: Re: matrix ill-conditioned
>
> Can you send me the design matrix (Xg.dat) and fsgd file?
>
>
> On 08/26/2013 04:35 PM, Jacobs H (NP) wrote:
>> Dear Doug,
>>
>> Thank you. I tried to run it with this version of mri_glmfit (saved as 
>> mri_glmfit2), but it still gives me the same error message.
>> I don't see the problem. I already divided the column with the interaction 
>> by 10.
>> Fsgd files without MMSE and interaction factors, did not gave a problem...
>> Could you have a look at it? I will attach the fsgd and contrast file.
>>
>> Thanks! I really appreciate your help!
>> Heidi
>>
>>
>> 
>> ERROR: matrix is ill-conditioned or badly scaled, condno = 101281
>> 
>> 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_glmfit2 --y 
>> rh.Alls_educlog_MMSE_inter_agecent_ICVcent_fsgd.sm20.mgh --fsgd 
>> /media/Data_disk/Nieuwe_map/FreeSurferOutputAD/FreeSurferOutputv450/FSGD/fsgd.Alls_educlog_MMSE_inter_agecent_ICVcent_fsgd.txt
>>  dods --glmdir 
>> rh.Alls_educlog_MMSE_inter_agecent_ICVcent_fsgd.dods.20.glmdir --surf 
>> fsaverage rh --C 
>> /media/Data_disk/Nieuwe_map/FreeSurferOutputAD/FreeSurferOutputv450/GLM_CONTRAST.MAT/contrast_3groups_Finteraction.mat
>> 2. The FSGD file (if using one)
>> 3. And the design matrix above
>>
>>
>> 
>> Dr. Heidi Jacobs
>> Postdoc researcher
>> Faculty of Health, Medicine and Life Sciences
>> School for Mental Health and Neurosciences
>> Division Cognitive Neuropsychiatry and Clinical Neurosciences
>> Alzheimer Center Limburg
>> h.jac...@maastrichtuniversity.nl
>> www.maastrichtuniversity.nl
>> www.heidijacobs.nl
>>
>> Dr. Tanslaan 12, 6229 ET Maastricht
>> P.O. Box 616, 6200 MD Maastricht, The Netherlands
>> T +31 43 38 84 090 F +31 43 38 84 092
>> 
>> 
>> Van: Douglas N Greve [gr...@nmr.mgh.harvard.edu]
>> Verzonden: maandag 26 augustus 2013 21:47
>> Aan: Jacobs H (NP)
>> CC: freesurfer@nmr.mgh.harvard.edu
>> Onderwerp: Re: matrix ill-conditioned
>>
>> You can try with this version of mri_glmfit which will do the rescaling
>> for you
>> ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/mri_glmfit
>>
>> If the problem persists then it may be an issue with your design
>>
>> doug
>>
>>
>> On 08/26/2013 01:42 PM, Jacobs H (NP) wrote:
>>> Hi Doug,
>>>
>>> I divided everything by 10, but the problem remains.
>>> I have been searching a bit more. Could it be that the problem is that the 
>>> range in cognitive scores in the control group is very small?
>>> When I run the groups separately, the patients are not a problem (the range 
>>> in cognition is very large), but the controls are still the problem.
>>>
>>> Thank

Re: [Freesurfer] matrix ill-conditioned....

2013-08-27 Thread Douglas N Greve

Hi Heidi, the problem is being caused by the interaction column. Try 
demeaning the ed_log and MMSE before multiplying them together to get 
the interaction. Do the demeaning on the entire data set, not on a group 
by group basis.
doug






On 08/27/2013 02:04 AM, Jacobs H (NP) wrote:
> Sure, here it is.
> Thanks
> Heidi
> 
> Dr. Heidi Jacobs
> Postdoc researcher
> Faculty of Health, Medicine and Life Sciences
> School for Mental Health and Neurosciences
> Division Cognitive Neuropsychiatry and Clinical Neurosciences
> Alzheimer Center Limburg
> h.jac...@maastrichtuniversity.nl
> www.maastrichtuniversity.nl
> www.heidijacobs.nl
>
> Dr. Tanslaan 12, 6229 ET Maastricht
> P.O. Box 616, 6200 MD Maastricht, The Netherlands
> T +31 43 38 84 090 F +31 43 38 84 092
> 
> 
> Van: Douglas N Greve [gr...@nmr.mgh.harvard.edu]
> Verzonden: maandag 26 augustus 2013 23:53
> Aan: Jacobs H (NP)
> CC: freesurfer@nmr.mgh.harvard.edu
> Onderwerp: Re: matrix ill-conditioned
>
> Can you send me the design matrix (Xg.dat) and fsgd file?
>
>
> On 08/26/2013 04:35 PM, Jacobs H (NP) wrote:
>> Dear Doug,
>>
>> Thank you. I tried to run it with this version of mri_glmfit (saved as 
>> mri_glmfit2), but it still gives me the same error message.
>> I don't see the problem. I already divided the column with the interaction 
>> by 10.
>> Fsgd files without MMSE and interaction factors, did not gave a problem...
>> Could you have a look at it? I will attach the fsgd and contrast file.
>>
>> Thanks! I really appreciate your help!
>> Heidi
>>
>>
>> 
>> ERROR: matrix is ill-conditioned or badly scaled, condno = 101281
>> 
>> 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_glmfit2 --y 
>> rh.Alls_educlog_MMSE_inter_agecent_ICVcent_fsgd.sm20.mgh --fsgd 
>> /media/Data_disk/Nieuwe_map/FreeSurferOutputAD/FreeSurferOutputv450/FSGD/fsgd.Alls_educlog_MMSE_inter_agecent_ICVcent_fsgd.txt
>>  dods --glmdir 
>> rh.Alls_educlog_MMSE_inter_agecent_ICVcent_fsgd.dods.20.glmdir --surf 
>> fsaverage rh --C 
>> /media/Data_disk/Nieuwe_map/FreeSurferOutputAD/FreeSurferOutputv450/GLM_CONTRAST.MAT/contrast_3groups_Finteraction.mat
>> 2. The FSGD file (if using one)
>> 3. And the design matrix above
>>
>>
>> 
>> Dr. Heidi Jacobs
>> Postdoc researcher
>> Faculty of Health, Medicine and Life Sciences
>> School for Mental Health and Neurosciences
>> Division Cognitive Neuropsychiatry and Clinical Neurosciences
>> Alzheimer Center Limburg
>> h.jac...@maastrichtuniversity.nl
>> www.maastrichtuniversity.nl
>> www.heidijacobs.nl
>>
>> Dr. Tanslaan 12, 6229 ET Maastricht
>> P.O. Box 616, 6200 MD Maastricht, The Netherlands
>> T +31 43 38 84 090 F +31 43 38 84 092
>> 
>> 
>> Van: Douglas N Greve [gr...@nmr.mgh.harvard.edu]
>> Verzonden: maandag 26 augustus 2013 21:47
>> Aan: Jacobs H (NP)
>> CC: freesurfer@nmr.mgh.harvard.edu
>> Onderwerp: Re: matrix ill-conditioned
>>
>> You can try with this version of mri_glmfit which will do the rescaling
>> for you
>> ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/mri_glmfit
>>
>> If the problem persists then it may be an issue with your design
>>
>> doug
>>
>>
>> On 08/26/2013 01:42 PM, Jacobs H (NP) wrote:
>>> Hi Doug,
>>>
>>> I divided everything by 10, but the problem remains.
>>> I have been searching a bit more. Could it be that the problem is that the 
>>> range in cognitive scores in the control group is very small?
>>> When I run the groups separately, the patients are not a problem (the range 
>>> in cognition is very large), but the controls are still the problem.
>>>
>>> Thanks!
>>> Heidi
>>> 
>>> Dr. Heidi Jacobs
>>> Postdoc researcher
>>> Faculty of Health, Medicine and Life Sciences
>>> School for Mental Health and Neurosciences
>>> Division Cognitive Neuropsychiatry and Clinical Neurosciences
>>> Alzheimer Center Limburg
>>> h.jac...@maastrichtuniversity.nl
>>> www.maastrichtuniversity.nl
>>> www.heidijacobs.nl
>>>
>>> Dr. Tanslaan 12, 6229 ET Maastricht
>>> P.O. Box 616, 6200 MD Maastricht, The Netherlands
>>> T +31 43 38 84 090 F +31 43 38 84 092
>>> 
>>> 
>>> Van: Douglas N Greve [gr...@nmr.mgh.harvard.edu]
>>> Verzonden: vrijdag 23 augustus 2013 17:31
>>> Aan: Jacobs H (NP)
>>> CC: freesurfer@nmr.mgh.harvard.edu
>>> Onderwerp: Re: [Freesurfer] FW:  FW:  Contrast and F-test
>>>
>>> The values in the interaction column are probably muc

Re: [Freesurfer] matrix ill-conditioned....

2013-08-26 Thread Jacobs H (NP)
Sure, here it is.
Thanks
Heidi

Dr. Heidi Jacobs
Postdoc researcher
Faculty of Health, Medicine and Life Sciences
School for Mental Health and Neurosciences
Division Cognitive Neuropsychiatry and Clinical Neurosciences
Alzheimer Center Limburg
h.jac...@maastrichtuniversity.nl
www.maastrichtuniversity.nl
www.heidijacobs.nl

Dr. Tanslaan 12, 6229 ET Maastricht
P.O. Box 616, 6200 MD Maastricht, The Netherlands
T +31 43 38 84 090 F +31 43 38 84 092


Van: Douglas N Greve [gr...@nmr.mgh.harvard.edu]
Verzonden: maandag 26 augustus 2013 23:53
Aan: Jacobs H (NP)
CC: freesurfer@nmr.mgh.harvard.edu
Onderwerp: Re: matrix ill-conditioned

Can you send me the design matrix (Xg.dat) and fsgd file?


On 08/26/2013 04:35 PM, Jacobs H (NP) wrote:
> Dear Doug,
>
> Thank you. I tried to run it with this version of mri_glmfit (saved as 
> mri_glmfit2), but it still gives me the same error message.
> I don't see the problem. I already divided the column with the interaction by 
> 10.
> Fsgd files without MMSE and interaction factors, did not gave a problem...
> Could you have a look at it? I will attach the fsgd and contrast file.
>
> Thanks! I really appreciate your help!
> Heidi
>
>
> 
> ERROR: matrix is ill-conditioned or badly scaled, condno = 101281
> 
> 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_glmfit2 --y rh.Alls_educlog_MMSE_inter_agecent_ICVcent_fsgd.sm20.mgh 
> --fsgd 
> /media/Data_disk/Nieuwe_map/FreeSurferOutputAD/FreeSurferOutputv450/FSGD/fsgd.Alls_educlog_MMSE_inter_agecent_ICVcent_fsgd.txt
>  dods --glmdir rh.Alls_educlog_MMSE_inter_agecent_ICVcent_fsgd.dods.20.glmdir 
> --surf fsaverage rh --C 
> /media/Data_disk/Nieuwe_map/FreeSurferOutputAD/FreeSurferOutputv450/GLM_CONTRAST.MAT/contrast_3groups_Finteraction.mat
>2. The FSGD file (if using one)
>3. And the design matrix above
>
>
> 
> Dr. Heidi Jacobs
> Postdoc researcher
> Faculty of Health, Medicine and Life Sciences
> School for Mental Health and Neurosciences
> Division Cognitive Neuropsychiatry and Clinical Neurosciences
> Alzheimer Center Limburg
> h.jac...@maastrichtuniversity.nl
> www.maastrichtuniversity.nl
> www.heidijacobs.nl
>
> Dr. Tanslaan 12, 6229 ET Maastricht
> P.O. Box 616, 6200 MD Maastricht, The Netherlands
> T +31 43 38 84 090 F +31 43 38 84 092
> 
> 
> Van: Douglas N Greve [gr...@nmr.mgh.harvard.edu]
> Verzonden: maandag 26 augustus 2013 21:47
> Aan: Jacobs H (NP)
> CC: freesurfer@nmr.mgh.harvard.edu
> Onderwerp: Re: matrix ill-conditioned
>
> You can try with this version of mri_glmfit which will do the rescaling
> for you
> ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/mri_glmfit
>
> If the problem persists then it may be an issue with your design
>
> doug
>
>
> On 08/26/2013 01:42 PM, Jacobs H (NP) wrote:
>> Hi Doug,
>>
>> I divided everything by 10, but the problem remains.
>> I have been searching a bit more. Could it be that the problem is that the 
>> range in cognitive scores in the control group is very small?
>> When I run the groups separately, the patients are not a problem (the range 
>> in cognition is very large), but the controls are still the problem.
>>
>> Thanks!
>> Heidi
>> 
>> Dr. Heidi Jacobs
>> Postdoc researcher
>> Faculty of Health, Medicine and Life Sciences
>> School for Mental Health and Neurosciences
>> Division Cognitive Neuropsychiatry and Clinical Neurosciences
>> Alzheimer Center Limburg
>> h.jac...@maastrichtuniversity.nl
>> www.maastrichtuniversity.nl
>> www.heidijacobs.nl
>>
>> Dr. Tanslaan 12, 6229 ET Maastricht
>> P.O. Box 616, 6200 MD Maastricht, The Netherlands
>> T +31 43 38 84 090 F +31 43 38 84 092
>> 
>> 
>> Van: Douglas N Greve [gr...@nmr.mgh.harvard.edu]
>> Verzonden: vrijdag 23 augustus 2013 17:31
>> Aan: Jacobs H (NP)
>> CC: freesurfer@nmr.mgh.harvard.edu
>> Onderwerp: Re: [Freesurfer] FW:  FW:  Contrast and F-test
>>
>> The values in the interaction column are probably much larger than the
>> values in the other columns (thus they are "badly scaled"). You can
>> divide them by a number to bring their scale down to that of the other
>> columns without changing the p-values. Version 5.x does this automatically.
>>
>>
>>
>>
>>
>> On 08/23/2013 11:25 AM, Jacobs H (NP) wrote:
>>> I am using version 4.5, as all the old analyses were also done with this 
>>> version.
>>> What do you mean with rescale?
>>> THanks
>>> 

Re: [Freesurfer] matrix ill-conditioned....

2013-08-26 Thread Douglas N Greve

Can you send me the design matrix (Xg.dat) and fsgd file?


On 08/26/2013 04:35 PM, Jacobs H (NP) wrote:
> Dear Doug,
>
> Thank you. I tried to run it with this version of mri_glmfit (saved as 
> mri_glmfit2), but it still gives me the same error message.
> I don't see the problem. I already divided the column with the interaction by 
> 10.
> Fsgd files without MMSE and interaction factors, did not gave a problem...
> Could you have a look at it? I will attach the fsgd and contrast file.
>
> Thanks! I really appreciate your help!
> Heidi
>
>
> 
> ERROR: matrix is ill-conditioned or badly scaled, condno = 101281
> 
> 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_glmfit2 --y rh.Alls_educlog_MMSE_inter_agecent_ICVcent_fsgd.sm20.mgh 
> --fsgd 
> /media/Data_disk/Nieuwe_map/FreeSurferOutputAD/FreeSurferOutputv450/FSGD/fsgd.Alls_educlog_MMSE_inter_agecent_ICVcent_fsgd.txt
>  dods --glmdir rh.Alls_educlog_MMSE_inter_agecent_ICVcent_fsgd.dods.20.glmdir 
> --surf fsaverage rh --C 
> /media/Data_disk/Nieuwe_map/FreeSurferOutputAD/FreeSurferOutputv450/GLM_CONTRAST.MAT/contrast_3groups_Finteraction.mat
>2. The FSGD file (if using one)
>3. And the design matrix above
>
>
> 
> Dr. Heidi Jacobs
> Postdoc researcher
> Faculty of Health, Medicine and Life Sciences
> School for Mental Health and Neurosciences
> Division Cognitive Neuropsychiatry and Clinical Neurosciences
> Alzheimer Center Limburg
> h.jac...@maastrichtuniversity.nl
> www.maastrichtuniversity.nl
> www.heidijacobs.nl
>
> Dr. Tanslaan 12, 6229 ET Maastricht
> P.O. Box 616, 6200 MD Maastricht, The Netherlands
> T +31 43 38 84 090 F +31 43 38 84 092
> 
> 
> Van: Douglas N Greve [gr...@nmr.mgh.harvard.edu]
> Verzonden: maandag 26 augustus 2013 21:47
> Aan: Jacobs H (NP)
> CC: freesurfer@nmr.mgh.harvard.edu
> Onderwerp: Re: matrix ill-conditioned
>
> You can try with this version of mri_glmfit which will do the rescaling
> for you
> ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/mri_glmfit
>
> If the problem persists then it may be an issue with your design
>
> doug
>
>
> On 08/26/2013 01:42 PM, Jacobs H (NP) wrote:
>> Hi Doug,
>>
>> I divided everything by 10, but the problem remains.
>> I have been searching a bit more. Could it be that the problem is that the 
>> range in cognitive scores in the control group is very small?
>> When I run the groups separately, the patients are not a problem (the range 
>> in cognition is very large), but the controls are still the problem.
>>
>> Thanks!
>> Heidi
>> 
>> Dr. Heidi Jacobs
>> Postdoc researcher
>> Faculty of Health, Medicine and Life Sciences
>> School for Mental Health and Neurosciences
>> Division Cognitive Neuropsychiatry and Clinical Neurosciences
>> Alzheimer Center Limburg
>> h.jac...@maastrichtuniversity.nl
>> www.maastrichtuniversity.nl
>> www.heidijacobs.nl
>>
>> Dr. Tanslaan 12, 6229 ET Maastricht
>> P.O. Box 616, 6200 MD Maastricht, The Netherlands
>> T +31 43 38 84 090 F +31 43 38 84 092
>> 
>> 
>> Van: Douglas N Greve [gr...@nmr.mgh.harvard.edu]
>> Verzonden: vrijdag 23 augustus 2013 17:31
>> Aan: Jacobs H (NP)
>> CC: freesurfer@nmr.mgh.harvard.edu
>> Onderwerp: Re: [Freesurfer] FW:  FW:  Contrast and F-test
>>
>> The values in the interaction column are probably much larger than the
>> values in the other columns (thus they are "badly scaled"). You can
>> divide them by a number to bring their scale down to that of the other
>> columns without changing the p-values. Version 5.x does this automatically.
>>
>>
>>
>>
>>
>> On 08/23/2013 11:25 AM, Jacobs H (NP) wrote:
>>> I am using version 4.5, as all the old analyses were also done with this 
>>> version.
>>> What do you mean with rescale?
>>> THanks
>>> Heidi
>>> 
>>> Van: freesurfer-boun...@nmr.mgh.harvard.edu 
>>> [freesurfer-boun...@nmr.mgh.harvard.edu] namens Douglas N Greve 
>>> [gr...@nmr.mgh.harvard.edu]
>>> Verzonden: vrijdag 23 augustus 2013 17:23
>>> Aan: freesurfer@nmr.mgh.harvard.edu
>>> Onderwerp: Re: [Freesurfer] FW:  FW:  Contrast and F-test
>>>
>>> what version of FS are you using? It may be that you just need to
>>> rescale that column (if the scale is much more than the other columns)
>>>
>>> On 08/23/2013 11:12 AM, Jacobs H (NP) wrote:
 Hi again!

 I am trying to run these contrasts but FreeSurfer tells me that "ERROR: 
 matrix is ill-conditioned or badly scaled, condno = 101380
 Possible problem with experimental design:
 Check fo

Re: [Freesurfer] matrix ill-conditioned....

2013-08-26 Thread Jacobs H (NP)
Dear Doug,

Thank you. I tried to run it with this version of mri_glmfit (saved as 
mri_glmfit2), but it still gives me the same error message.
I don't see the problem. I already divided the column with the interaction by 
10. 
Fsgd files without MMSE and interaction factors, did not gave a problem...
Could you have a look at it? I will attach the fsgd and contrast file.

Thanks! I really appreciate your help!
Heidi



ERROR: matrix is ill-conditioned or badly scaled, condno = 101281

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_glmfit2 --y rh.Alls_educlog_MMSE_inter_agecent_ICVcent_fsgd.sm20.mgh 
--fsgd 
/media/Data_disk/Nieuwe_map/FreeSurferOutputAD/FreeSurferOutputv450/FSGD/fsgd.Alls_educlog_MMSE_inter_agecent_ICVcent_fsgd.txt
 dods --glmdir rh.Alls_educlog_MMSE_inter_agecent_ICVcent_fsgd.dods.20.glmdir 
--surf fsaverage rh --C 
/media/Data_disk/Nieuwe_map/FreeSurferOutputAD/FreeSurferOutputv450/GLM_CONTRAST.MAT/contrast_3groups_Finteraction.mat
 
  2. The FSGD file (if using one)
  3. And the design matrix above



Dr. Heidi Jacobs
Postdoc researcher
Faculty of Health, Medicine and Life Sciences
School for Mental Health and Neurosciences
Division Cognitive Neuropsychiatry and Clinical Neurosciences
Alzheimer Center Limburg
h.jac...@maastrichtuniversity.nl
www.maastrichtuniversity.nl
www.heidijacobs.nl

Dr. Tanslaan 12, 6229 ET Maastricht
P.O. Box 616, 6200 MD Maastricht, The Netherlands
T +31 43 38 84 090 F +31 43 38 84 092


Van: Douglas N Greve [gr...@nmr.mgh.harvard.edu]
Verzonden: maandag 26 augustus 2013 21:47
Aan: Jacobs H (NP)
CC: freesurfer@nmr.mgh.harvard.edu
Onderwerp: Re: matrix ill-conditioned

You can try with this version of mri_glmfit which will do the rescaling
for you
ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/mri_glmfit

If the problem persists then it may be an issue with your design

doug


On 08/26/2013 01:42 PM, Jacobs H (NP) wrote:
> Hi Doug,
>
> I divided everything by 10, but the problem remains.
> I have been searching a bit more. Could it be that the problem is that the 
> range in cognitive scores in the control group is very small?
> When I run the groups separately, the patients are not a problem (the range 
> in cognition is very large), but the controls are still the problem.
>
> Thanks!
> Heidi
> 
> Dr. Heidi Jacobs
> Postdoc researcher
> Faculty of Health, Medicine and Life Sciences
> School for Mental Health and Neurosciences
> Division Cognitive Neuropsychiatry and Clinical Neurosciences
> Alzheimer Center Limburg
> h.jac...@maastrichtuniversity.nl
> www.maastrichtuniversity.nl
> www.heidijacobs.nl
>
> Dr. Tanslaan 12, 6229 ET Maastricht
> P.O. Box 616, 6200 MD Maastricht, The Netherlands
> T +31 43 38 84 090 F +31 43 38 84 092
> 
> 
> Van: Douglas N Greve [gr...@nmr.mgh.harvard.edu]
> Verzonden: vrijdag 23 augustus 2013 17:31
> Aan: Jacobs H (NP)
> CC: freesurfer@nmr.mgh.harvard.edu
> Onderwerp: Re: [Freesurfer] FW:  FW:  Contrast and F-test
>
> The values in the interaction column are probably much larger than the
> values in the other columns (thus they are "badly scaled"). You can
> divide them by a number to bring their scale down to that of the other
> columns without changing the p-values. Version 5.x does this automatically.
>
>
>
>
>
> On 08/23/2013 11:25 AM, Jacobs H (NP) wrote:
>> I am using version 4.5, as all the old analyses were also done with this 
>> version.
>> What do you mean with rescale?
>> THanks
>> Heidi
>> 
>> Van: freesurfer-boun...@nmr.mgh.harvard.edu 
>> [freesurfer-boun...@nmr.mgh.harvard.edu] namens Douglas N Greve 
>> [gr...@nmr.mgh.harvard.edu]
>> Verzonden: vrijdag 23 augustus 2013 17:23
>> Aan: freesurfer@nmr.mgh.harvard.edu
>> Onderwerp: Re: [Freesurfer] FW:  FW:  Contrast and F-test
>>
>> what version of FS are you using? It may be that you just need to
>> rescale that column (if the scale is much more than the other columns)
>>
>> On 08/23/2013 11:12 AM, Jacobs H (NP) wrote:
>>> Hi again!
>>>
>>> I am trying to run these contrasts but FreeSurfer tells me that "ERROR: 
>>> matrix is ill-conditioned or badly scaled, condno = 101380
>>> Possible problem with experimental design:
>>> Check for duplicate entries and/or lack of range of
>>> continuous variables within a class."
>>>
>>> Could this be due to the fact that there is a high correlation between 
>>> cognition, education and cognition x education? (the product is correlated 
>>> with the factors of that product)
>>

Re: [Freesurfer] matrix ill-conditioned....

2013-08-26 Thread Douglas N Greve

You can try with this version of mri_glmfit which will do the rescaling 
for you
ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/mri_glmfit

If the problem persists then it may be an issue with your design

doug


On 08/26/2013 01:42 PM, Jacobs H (NP) wrote:
> Hi Doug,
>
> I divided everything by 10, but the problem remains.
> I have been searching a bit more. Could it be that the problem is that the 
> range in cognitive scores in the control group is very small?
> When I run the groups separately, the patients are not a problem (the range 
> in cognition is very large), but the controls are still the problem.
>
> Thanks!
> Heidi
> 
> Dr. Heidi Jacobs
> Postdoc researcher
> Faculty of Health, Medicine and Life Sciences
> School for Mental Health and Neurosciences
> Division Cognitive Neuropsychiatry and Clinical Neurosciences
> Alzheimer Center Limburg
> h.jac...@maastrichtuniversity.nl
> www.maastrichtuniversity.nl
> www.heidijacobs.nl
>
> Dr. Tanslaan 12, 6229 ET Maastricht
> P.O. Box 616, 6200 MD Maastricht, The Netherlands
> T +31 43 38 84 090 F +31 43 38 84 092
> 
> 
> Van: Douglas N Greve [gr...@nmr.mgh.harvard.edu]
> Verzonden: vrijdag 23 augustus 2013 17:31
> Aan: Jacobs H (NP)
> CC: freesurfer@nmr.mgh.harvard.edu
> Onderwerp: Re: [Freesurfer] FW:  FW:  Contrast and F-test
>
> The values in the interaction column are probably much larger than the
> values in the other columns (thus they are "badly scaled"). You can
> divide them by a number to bring their scale down to that of the other
> columns without changing the p-values. Version 5.x does this automatically.
>
>
>
>
>
> On 08/23/2013 11:25 AM, Jacobs H (NP) wrote:
>> I am using version 4.5, as all the old analyses were also done with this 
>> version.
>> What do you mean with rescale?
>> THanks
>> Heidi
>> 
>> Van: freesurfer-boun...@nmr.mgh.harvard.edu 
>> [freesurfer-boun...@nmr.mgh.harvard.edu] namens Douglas N Greve 
>> [gr...@nmr.mgh.harvard.edu]
>> Verzonden: vrijdag 23 augustus 2013 17:23
>> Aan: freesurfer@nmr.mgh.harvard.edu
>> Onderwerp: Re: [Freesurfer] FW:  FW:  Contrast and F-test
>>
>> what version of FS are you using? It may be that you just need to
>> rescale that column (if the scale is much more than the other columns)
>>
>> On 08/23/2013 11:12 AM, Jacobs H (NP) wrote:
>>> Hi again!
>>>
>>> I am trying to run these contrasts but FreeSurfer tells me that "ERROR: 
>>> matrix is ill-conditioned or badly scaled, condno = 101380
>>> Possible problem with experimental design:
>>> Check for duplicate entries and/or lack of range of
>>> continuous variables within a class."
>>>
>>> Could this be due to the fact that there is a high correlation between 
>>> cognition, education and cognition x education? (the product is correlated 
>>> with the factors of that product)
>>> Or is something else going on?
>>> How can I solve this?
>>>
>>> Thanks
>>> Heidi
>>>
>>> 
>>> Van: freesurfer-boun...@nmr.mgh.harvard.edu 
>>> [freesurfer-boun...@nmr.mgh.harvard.edu] namens Douglas N Greve 
>>> [gr...@nmr.mgh.harvard.edu]
>>> Verzonden: donderdag 22 augustus 2013 17:52
>>> Aan: freesurfer@nmr.mgh.harvard.edu
>>> Onderwerp: Re: [Freesurfer] FW:  FW:  Contrast and F-test
>>>
>>> both of those contrasts are correct
>>> doug
>>>
>>> On 08/22/2013 10:51 AM, Jacobs H (NP) wrote:
 Arrghh, again wrong email, sorry

 Thanks. I think I understand the rational behind it.
 Just to be sure, would this be correct:

 For each group separately
 0 0 0 1 0 0  (group - cognition - education - cognition x education - age 
 - ICV)

 For the F-test (same order)
 0 0 0 0 0 0 0 0 0 1 -1 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 1 0 -1 0 0 0 0 0 0

 Heidi


 
 Van: freesurfer-boun...@nmr.mgh.harvard.edu 
 [freesurfer-boun...@nmr.mgh.harvard.edu] namens Douglas N Greve 
 [gr...@nmr.mgh.harvard.edu]
 Verzonden: donderdag 22 augustus 2013 16:46
 Aan: freesurfer@nmr.mgh.harvard.edu
 Onderwerp: Re: [Freesurfer] FW:  Contrast and F-test

 you need to have all 3. If you want to examine the interaction, then you
 need a new contrast to test the interaction. Set all to 0 except for the
 interaction term
 doug


 On 08/22/2013 10:42 AM, Jacobs H (NP) wrote:
> Dear Doug,
> Thank you for the information. Sorry for not sending this to the list.
> Do you mean that I then have to include the three variables (covariate 1, 
> covariate 2, product of these two) or only the product in the fsgd file?
> If I need to include all three of them, can you advise me on the 
> contrasts?
> If it is only the product, I think I can use the same contrasts as 
> before, right?
>
>

[Freesurfer] matrix ill-conditioned....

2013-08-26 Thread Jacobs H (NP)

Hi Doug,

I divided everything by 10, but the problem remains.
I have been searching a bit more. Could it be that the problem is that the 
range in cognitive scores in the control group is very small?
When I run the groups separately, the patients are not a problem (the range in 
cognition is very large), but the controls are still the problem.

Thanks!
Heidi

Dr. Heidi Jacobs
Postdoc researcher
Faculty of Health, Medicine and Life Sciences
School for Mental Health and Neurosciences
Division Cognitive Neuropsychiatry and Clinical Neurosciences
Alzheimer Center Limburg
h.jac...@maastrichtuniversity.nl
www.maastrichtuniversity.nl
www.heidijacobs.nl

Dr. Tanslaan 12, 6229 ET Maastricht
P.O. Box 616, 6200 MD Maastricht, The Netherlands
T +31 43 38 84 090 F +31 43 38 84 092


Van: Douglas N Greve [gr...@nmr.mgh.harvard.edu]
Verzonden: vrijdag 23 augustus 2013 17:31
Aan: Jacobs H (NP)
CC: freesurfer@nmr.mgh.harvard.edu
Onderwerp: Re: [Freesurfer] FW:  FW:  Contrast and F-test

The values in the interaction column are probably much larger than the
values in the other columns (thus they are "badly scaled"). You can
divide them by a number to bring their scale down to that of the other
columns without changing the p-values. Version 5.x does this automatically.





On 08/23/2013 11:25 AM, Jacobs H (NP) wrote:
> I am using version 4.5, as all the old analyses were also done with this 
> version.
> What do you mean with rescale?
> THanks
> Heidi
> 
> Van: freesurfer-boun...@nmr.mgh.harvard.edu 
> [freesurfer-boun...@nmr.mgh.harvard.edu] namens Douglas N Greve 
> [gr...@nmr.mgh.harvard.edu]
> Verzonden: vrijdag 23 augustus 2013 17:23
> Aan: freesurfer@nmr.mgh.harvard.edu
> Onderwerp: Re: [Freesurfer] FW:  FW:  Contrast and F-test
>
> what version of FS are you using? It may be that you just need to
> rescale that column (if the scale is much more than the other columns)
>
> On 08/23/2013 11:12 AM, Jacobs H (NP) wrote:
>> Hi again!
>>
>> I am trying to run these contrasts but FreeSurfer tells me that "ERROR: 
>> matrix is ill-conditioned or badly scaled, condno = 101380
>> Possible problem with experimental design:
>> Check for duplicate entries and/or lack of range of
>> continuous variables within a class."
>>
>> Could this be due to the fact that there is a high correlation between 
>> cognition, education and cognition x education? (the product is correlated 
>> with the factors of that product)
>> Or is something else going on?
>> How can I solve this?
>>
>> Thanks
>> Heidi
>>
>> 
>> Van: freesurfer-boun...@nmr.mgh.harvard.edu 
>> [freesurfer-boun...@nmr.mgh.harvard.edu] namens Douglas N Greve 
>> [gr...@nmr.mgh.harvard.edu]
>> Verzonden: donderdag 22 augustus 2013 17:52
>> Aan: freesurfer@nmr.mgh.harvard.edu
>> Onderwerp: Re: [Freesurfer] FW:  FW:  Contrast and F-test
>>
>> both of those contrasts are correct
>> doug
>>
>> On 08/22/2013 10:51 AM, Jacobs H (NP) wrote:
>>> Arrghh, again wrong email, sorry
>>>
>>> Thanks. I think I understand the rational behind it.
>>> Just to be sure, would this be correct:
>>>
>>> For each group separately
>>> 0 0 0 1 0 0  (group - cognition - education - cognition x education - age - 
>>> ICV)
>>>
>>> For the F-test (same order)
>>> 0 0 0 0 0 0 0 0 0 1 -1 0 0 0 0 0 0 0
>>> 0 0 0 0 0 0 0 0 0 1 0 -1 0 0 0 0 0 0
>>>
>>> Heidi
>>>
>>>
>>> 
>>> Van: freesurfer-boun...@nmr.mgh.harvard.edu 
>>> [freesurfer-boun...@nmr.mgh.harvard.edu] namens Douglas N Greve 
>>> [gr...@nmr.mgh.harvard.edu]
>>> Verzonden: donderdag 22 augustus 2013 16:46
>>> Aan: freesurfer@nmr.mgh.harvard.edu
>>> Onderwerp: Re: [Freesurfer] FW:  Contrast and F-test
>>>
>>> you need to have all 3. If you want to examine the interaction, then you
>>> need a new contrast to test the interaction. Set all to 0 except for the
>>> interaction term
>>> doug
>>>
>>>
>>> On 08/22/2013 10:42 AM, Jacobs H (NP) wrote:
 Dear Doug,
 Thank you for the information. Sorry for not sending this to the list.
 Do you mean that I then have to include the three variables (covariate 1, 
 covariate 2, product of these two) or only the product in the fsgd file?
 If I need to include all three of them, can you advise me on the contrasts?
 If it is only the product, I think I can use the same contrasts as before, 
 right?

 Thanks
 Heidi
 
 Dr. Heidi Jacobs
 Postdoc researcher
 Faculty of Health, Medicine and Life Sciences
 School for Mental Health and Neurosciences
 Division Cognitive Neuropsychiatry and Clinical Neurosciences
 Alzheimer Center Limburg
 h.jac...@maastrichtuniversity.nl
 www.maastrichtuniversity.nl
 www.heidijacobs.nl

 Dr. Tanslaan 12, 6229

Re: [Freesurfer] Matrix ill-conditioned and "yellow brain"

2007-11-06 Thread Doug Greve


There is not an error, per se. An ill-conditioned matrix means that your 
design matrix has two or more columns that are too similar. Check your 
continuous variables to see whether they are similar (eg, age and 
education level). Finally, it is difficult to diagnose the problem 
without more info, try looking at 
surfer.nmr.mgh.harvard.edu/fswiki/BugReporting for better ways to report 
problems.


doug



Juergen Haenggi wrote:


Dear Freesurfer experts

We have two problems with FS statistics.

One problem occurred when using mri_glmfit:

Matrix condition is 11198.7
ERROR: matrix is ill-conditioned or badly scaled, condno = 11198.7
Possible problem with experimental design:
Check for duplicate entries and/or lack of range of
continuous variables within a class.

I inspected the FSGD file but did not find any error!
There was a suggestion in the FS archives to look at the design matrix for
significant off-diagonal values but the design matrix (X.mat) was not
produced
Any idea where the problem is?


In another contrast the sig.mgh file produced huge values and the whole
brain is colored yellow (see attachment).
What happens here?

Thanks a lot in advance
Best regards
Juergen


---
Juergen Haenggi
Ph.D. (Dr. des.)
Division of Neuropsychology
Institute of Psychology
University of Zurich
Binzmuehlestrasse 14, PO Box 25
8050 Zurich, Switzerland
0041 44 635 73 97 (phone office)
0041 76 445 86 84 (phone mobile)
0041 44 635 74 09 (fax office)
BIN 4.D.04 (office room number)
[EMAIL PROTECTED] (email)
http://www.psychologie.uzh.ch/neuropsy/ (website)
http://www.juergenhaenggi.ch (private website)
---

 




___
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
[EMAIL PROTECTED]
Phone Number: 617-724-2358 
Fax: 617-726-7422


In order to help us help you, please follow the steps in:
surfer.nmr.mgh.harvard.edu/fswiki/BugReporting


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