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.
>>>
>>> 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 ET Maastricht
>>>>>>> P.O. Box 616, 6200 MD Maastricht, The Netherlands
>>>>>>> T +31 43 38 84 090 F +31 43 38 84 092
>>>>>>> ================================================
>>>>>>> ________________________________________
>>>>>>> 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:34
>>>>>>> Aan: freesurfer@nmr.mgh.harvard.edu
>>>>>>> Onderwerp: Re: [Freesurfer] Contrast and F-test
>>>>>>>
>>>>>>> If you want to test for an interaction between continuous variables,
>>>>>>> then you should create a new regressor by multiplying them together then
>>>>>>> test that regressor
>>>>>>> doug
>>>>>>>
>>>>>>>
>>>>>>> On 08/22/2013 08:09 AM, Jacobs H (NP) wrote:
>>>>>>>> Hi all,
>>>>>>>>
>>>>>>>> I my manuscript, I examined the association between cognition and 
>>>>>>>> cortical thickness. I first did this in three groups separately and 
>>>>>>>> then ran a F-test.
>>>>>>>> One of the reviewers, now wants me to examine the interaction between 
>>>>>>>> cognition and education (all continuous).
>>>>>>>>
>>>>>>>> Would this be the correct contrast for each group separately (last two 
>>>>>>>> zeros are for covariates, also continuous)
>>>>>>>>
>>>>>>>> 0 1 -1 0 0
>>>>>>>>
>>>>>>>> Would this be the correct way for the F-test:
>>>>>>>>
>>>>>>>> 0 0 0 0 0 1 -1 0 -1 1 0 0 0 0 0 0 0
>>>>>>>> 0 0 0 1 0 -1 -1 0 1 0 0 0 0 0 0
>>>>>>>>
>>>>>>>> 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
>>>>>>>> ================================================
>>>>>>>> _______________________________________________
>>>>>>>> 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 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
>>>>>>
>>>>>> _______________________________________________
>>>>>> 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
>>>>>
>>>>> _______________________________________________
>>>>> 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
>>>>
>>>>
>>> --
>>> 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/
>>>
>>>
>>>
>> --
>> 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/
>>
> --
> 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/

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

Reply via email to