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

2019-03-07 Thread Arsenije Subotic
External Email - Use Caution

Hi Doug,

I realized this error a couple of days ago and now it works.

Thank you,
Arsenije


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


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

2019-03-06 Thread Greve, Douglas N.,Ph.D.
Your FSGD file is incorrect in several ways. Under "variables" you have 
"Sex" and list "Male" and "Female". The variables must be numbers, not 
strings. The variables should also represent continuous quantities, not 
categories. To handle sex, you should have a total of 6 categories, the 
3 that you have divided into male an female.

On 3/5/19 12:51 PM, Arsenije Subotic wrote:
>
> External Email - Use Caution
>
> Hi,
>
> I am still struggling to examine differences in thickness using the 
> command line stream for my two groups after controlling for age and 
> sex. I get the following error when running the command line:
>
> 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.bin --y CAA_CTRL_RH.thickness.10.mgh --fsgd
> CAA_CTRL_RH_Age_Sex.fsgd --C Contrasts/CAA-CTRL_Age_Sex.mtx --surf fsaverage 
> rh
> --cortex --glmdir CAA_CTRL_RH_Age_Sex_Unix.glmdir
>2. The FSGD file (if using one)
>3. And the design matrix above
> Attempting to diagnose further
> SumSq: Min=0.00 (col 5), Max=611.699463 (col 4)
>   The scale is much different between columns 5 and 4, you may want to
>   normalize by subtracting the mean and dividing by the standard deviation.
> Column 5,  all values are 0
> Column 6,  all values are 0
> Columns 5 and 6 are the same
>
>
>
> My design matrix is:
> 1 -1 0 0 0 0 (Examining difference in thickness after controlling for effects
> of age and sex)
>
> I’ve also attached the FSGD file that I’ve been using. Please let 
> me know if there is something wrong with the file (although I have 
> used a similar file without the covariates and did not have any issues).
>
> Thanks!
> Arsenije
> ---
> *Arsenije Subotic*| MSc Student
> Department of Clinical Neurosciences
> Hotchkiss Brain Institute, University of Calgary | T2N 4N1, Canada
> Tel: (403) 918-6970
> arsenije.subot...@ucalgary.ca 
>
>
> ___
> 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] matrix is ill-conditioned or badly scaled, condno = 1e+08

2019-03-05 Thread Arsenije Subotic
External Email - Use Caution

Hi,

I am still struggling to examine differences in thickness using the command 
line stream for my two groups after controlling for age and sex. I get the 
following error when running the command line:


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.bin --y CAA_CTRL_RH.thickness.10.mgh --fsgd
CAA_CTRL_RH_Age_Sex.fsgd --C Contrasts/CAA-CTRL_Age_Sex.mtx --surf fsaverage rh
--cortex --glmdir CAA_CTRL_RH_Age_Sex_Unix.glmdir
  2. The FSGD file (if using one)
  3. And the design matrix above
Attempting to diagnose further
SumSq: Min=0.00 (col 5), Max=611.699463 (col 4)
 The scale is much different between columns 5 and 4, you may want to
 normalize by subtracting the mean and dividing by the standard deviation.
Column 5,  all values are 0
Column 6,  all values are 0
Columns 5 and 6 are the same




My design matrix is:
1 -1 0 0 0 0 (Examining difference in thickness after controlling for effects
of age and sex)

I’ve also attached the FSGD file that I’ve been using. Please let me know 
if there is something wrong with the file (although I have used a similar file 
without the covariates and did not have any issues).

Thanks!
Arsenije
---
Arsenije Subotic | MSc Student
Department of Clinical Neurosciences
Hotchkiss Brain Institute, University of Calgary | T2N 4N1, Canada
Tel: (403) 918-6970
arsenije.subot...@ucalgary.ca



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

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

2019-03-01 Thread Arsenije Subotic
External Email - Use Caution

Hi Doug,


This is the bulk of the text I wrote initially in my first email:


Dear experts,

I have recently tried to use the command line to examine thickness differences 
between two groups after controlling for the effects of age and sex. I get the 
following 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.bin --y CAA_CTRL_RH.thickness.10.mgh --fsgd 
CAA_CTRL_RH_Age_Sex.fsgd --C Contrasts/CAA-CTRL_Age_Sex.mtx --surf fsaverage rh 
--cortex --glmdir CAA_CTRL_RH_Age_Sex_Unix.glmdir
  2. The FSGD file (if using one)
  3. And the design matrix above
Attempting to diagnose further
SumSq: Min=0.00 (col 5), Max=611.699463 (col 4)
 The scale is much different between columns 5 and 4, you may want to
 normalize by subtracting the mean and dividing by the standard deviation.
Column 5,  all values are 0
Column 6,  all values are 0
Columns 5 and 6 are the same

I did not get this error when I was only looking at the difference in thickness 
between the two groups, so I am guessing there is not an issue with the file 
format? Looking at the log, does this mean that I also need to demean the age 
variable? I was planning on running some contrasts looking at the interactions 
between group and age after controlling for sex etc. in order to see if I 
should go with a DOSS approach, but using those contrasts still gives me the 
same error.


Thanks,

Arsenije


---

Arsenije Subotic | MSc Student

Department of Clinical Neurosciences

Hotchkiss Brain Institute, University of Calgary | T2N 4N1, Canada

Tel: (403) 918-6970

arsenije.subot...@ucalgary.ca

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

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

2019-03-01 Thread Greve, Douglas N.,Ph.D.
sorry, can you also include the previous emails so I know what the context is?

On 3/1/19 1:02 PM, Arsenije Subotic wrote:

External Email - Use Caution

Hi Doug,

Thank you for your reply.

My command was:
mri_glmfit.bin --y CAA_CTRL_RH.thickness.10.mgh --fsgd CAA_CTRL_RH_Age_Sex.fsgd 
--C Contrasts/CAA-CTRL_Age_Sex.mtx --surf fsaverage rh --cortex --glmdir 
CAA_CTRL_RH_Age_Sex_Unix.glmdir

My FSGD file is attached. It contains 2 classes and two covariates (Age and 
Sex).

My design matrix is:
1 -1 0 0 0 0 (Examining difference in thickness after controlling for effects 
of age and sex)
Please let me know what the issue is.

Best,
Arsenije



___
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] matrix is ill-conditioned or badly scaled, condno = 1e+08

2019-03-01 Thread Arsenije Subotic
External Email - Use Caution

Hi Doug,

Thank you for your reply.

My command was:
mri_glmfit.bin --y CAA_CTRL_RH.thickness.10.mgh --fsgd CAA_CTRL_RH_Age_Sex.fsgd 
--C Contrasts/CAA-CTRL_Age_Sex.mtx --surf fsaverage rh --cortex --glmdir 
CAA_CTRL_RH_Age_Sex_Unix.glmdir

My FSGD file is attached. It contains 2 classes and two covariates (Age and 
Sex).

My design matrix is:
1 -1 0 0 0 0 (Examining difference in thickness after controlling for effects 
of age and sex)
Please let me know what the issue is.

Best,
Arsenije


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

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

2019-02-28 Thread Greve, Douglas N.,Ph.D.
Did you see the line "If you seek help with this problem, make sure to 
send:" and then it lists some things to send

On 2/25/19 2:13 PM, Arsenije Subotic wrote:
>
> External Email - Use Caution
>
> Dear experts,
>
> I have recently tried to use the command line to examine thickness 
> differences between two groups after controlling for the effects of 
> age and sex. I get the following 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.bin --y CAA_CTRL_RH.thickness.10.mgh --fsgd 
> CAA_CTRL_RH_Age_Sex.fsgd --C Contrasts/CAA-CTRL_Age_Sex.mtx --surf 
> fsaverage rh --cortex --glmdir CAA_CTRL_RH_Age_Sex_Unix.glmdir
>   2. The FSGD file (if using one)
>   3. And the design matrix above
> Attempting to diagnose further
> SumSq: Min=0.00 (col 5), Max=611.699463 (col 4)
>  The scale is much different between columns 5 and 4, you may want to
>  normalize by subtracting the mean and dividing by the standard deviation.
> Column 5,  all values are 0
> Column 6,  all values are 0
> Columns 5 and 6 are the same
>
> I did not get this error when I was only looking at the difference in 
> thickness between the two groups, so I am guessing there is not an 
> issue with the file format? Looking at the log, does this mean that I 
> also need to demean the age variable? I was planning on running some 
> contrasts looking at the interactions between group and age after 
> controlling for sex etc. in order to see if I should go with a DOSS 
> approach, but using those contrasts still gives me the same error.
>
> Thanks for your help!
>
> Best,
> Arsenije
> ---
> *Arsenije Subotic*| MSc Student
> Department of Clinical Neurosciences
> Hotchkiss Brain Institute, University of Calgary | T2N 4N1, Canada
> Tel: (403) 918-6970
> arsenije.subot...@ucalgary.ca 
>
>
> ___
> 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] matrix is ill-conditioned or badly scaled, condno = 1e+08

2017-03-16 Thread Douglas N Greve
You have commas (ie, ",") instead of decimal points (ie, ".") in your 
fsgd file. Try replacing them and see if that works


On 03/16/2017 08:59 AM, teodora petrova wrote:
> Hello,
>
> I am trying to use the glm_fit to correlate a continuous variable 
> (index) with cortical thickness, when controlling for age, education, 
> and cognition (MMSE) (all continuous variables). However, I get the 
> following 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.index.thickness.10.mgh --fsgd index.fsgd dods 
> --C index.mtx --surf fsaverage lh --cortex --glmdir lh.index.glmdir
>   2. The FSGD file (if using one)
>   3. And the design matrix above
>
> Please find attached my fsgd file and the design matrix.
> I searched the archives and found out that a possible reason for this 
> may be creating my file in Windows. Indeed, I created it by 
> copy-pasting the data from an Excel spreadsheet into an empty txt 
> file. I tried to convert it on Linux, using the command old.fsgd | sed 
> 's/\r/\n/g' > new.fsgd, as well as making a new txt file on Linux (by 
> copy -paste from a spreadsheet), but these did not work either.  How 
> can I solve this?
>
> Thank you for the help!
>
> Best,
> Teodora
>
>
>
>
> ___
> 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] matrix is ill-conditioned or badly scaled, condno = 1e+08

2016-06-29 Thread Arkadiy Maksimovskiy
Thank you for catching this. Really appreciate your help.
- Arkadiiy
___
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 is ill-conditioned or badly scaled, condno = 1e+08

2016-06-23 Thread Douglas Greve

You have no HDFemales so the 2nd column is 0.


On 6/21/16 7:40 PM, Arkadiy Maksimovskiy wrote:

Hello,

Hello,

I am getting the following error:

ERROR: matrix is ill-conditioned or badly scaled, condno = 1e+08

Command line:
mri_glmfit --y lh.BD_SD.thickness.10B.mgh --fsgd 
FSGD_Collapsed_Across_Smokers_demeaned.fsgd dods --C BDvsSD1.mtx 
--surf fsaverage lh --cortex --glmdir lh.BD_SD.glmdir

The FSGD file (if using one)
Design matrix:

Design matrix --
 0.000   0.000   0.000   0.000   1.000   0.000   0.000 0.000   0.000   
0.000  -2.151   0.000   0.000   0.000 0.000   0.000   9.340   0.000;
 0.000   0.000   0.000   0.000   1.000   0.000   0.000 0.000   0.000   
0.000  -2.151   0.000   0.000   0.000 0.000   0.000  -2.660   0.000;
 0.000   0.000   0.000   0.000   1.000   0.000   0.000 0.000   0.000   
0.000   1.849   0.000   0.000   0.000 0.000   0.000  -31.660   0.000;
 0.000   0.000   0.000   0.000   1.000   0.000   0.000 0.000   0.000   
0.000  -2.151   0.000   0.000   0.000 0.000   0.000  -37.660   0.000;
 0.000   0.000   0.000   0.000   1.000   0.000   0.000 0.000   0.000   
0.000  -2.151   0.000   0.000   0.000 0.000   0.000   26.340   0.000;
 0.000   0.000   0.000   0.000   0.000   1.000   0.000 0.000   0.000   
0.000   0.000  -0.151   0.000   0.000 0.000   0.000   0.000  -20.660;
 0.000   0.000   0.000   0.000   1.000   0.000   0.000 0.000   0.000   
0.000  -1.151   0.000   0.000   0.000 0.000   0.000  -22.660   0.000;
 0.000   0.000   0.000   0.000   1.000   0.000   0.000 0.000   0.000   
0.000   3.849   0.000   0.000   0.000 0.000   0.000  -16.660   0.000;
 0.000   0.000   0.000   0.000   1.000   0.000   0.000 0.000   0.000   
0.000  -1.151   0.000   0.000   0.000 0.000   0.000   14.340   0.000;
 0.000   0.000   0.000   0.000   1.000   0.000   0.000 0.000   0.000   
0.000   2.849   0.000   0.000   0.000 0.000   0.000  -27.660   0.000;
 0.000   0.000   0.000   0.000   1.000   0.000   0.000 0.000   0.000   
0.000   1.849   0.000   0.000   0.000 0.000   0.000   4.340   0.000;
 0.000   0.000   0.000   0.000   1.000   0.000   0.000 0.000   0.000   
0.000  -0.151   0.000   0.000   0.000 0.000   0.000  -30.660   0.000;
 0.000   0.000   0.000   0.000   1.000   0.000   0.000 0.000   0.000   
0.000   0.849   0.000   0.000   0.000 0.000   0.000  -28.660   0.000;
 0.000   0.000   0.000   0.000   1.000   0.000   0.000 0.000   0.000   
0.000   0.849   0.000   0.000   0.000 0.000   0.000  -23.660   0.000;
 0.000   0.000   0.000   0.000   1.000   0.000   0.000 0.000   0.000   
0.000  -2.151   0.000   0.000   0.000 0.000   0.000  -27.660   0.000;
 0.000   0.000   0.000   0.000   1.000   0.000   0.000 0.000   0.000   
0.000   2.849   0.000   0.000   0.000 0.000   0.000   13.340   0.000;
 0.000   0.000   0.000   0.000   1.000   0.000   0.000 0.000   0.000   
0.000  -2.151   0.000   0.000   0.000 0.000   0.000   5.340   0.000;
 1.000   0.000   0.000   0.000   0.000   0.000  -2.151 0.000   0.000   
0.000   0.000   0.000   36.340   0.000 0.000   0.000   0.000   0.000;
 1.000   0.000   0.000   0.000   0.000   0.000  -1.151 0.000   0.000   
0.000   0.000   0.000  -0.660   0.000 0.000   0.000   0.000   0.000;
 1.000   0.000   0.000   0.000   0.000   0.000  -2.151 0.000   0.000   
0.000   0.000   0.000   54.340   0.000 0.000   0.000   0.000   0.000;
 1.000   0.000   0.000   0.000   0.000   0.000  -1.151 0.000   0.000   
0.000   0.000   0.000   45.340   0.000 0.000   0.000   0.000   0.000;
 1.000   0.000   0.000   0.000   0.000   0.000  -2.151 0.000   0.000   
0.000   0.000   0.000   22.340   0.000 0.000   0.000   0.000   0.000;
 1.000   0.000   0.000   0.000   0.000   0.000   1.849 0.000   0.000   
0.000   0.000   0.000   38.340   0.000 0.000   0.000   0.000   0.000;
 1.000   0.000   0.000   0.000   0.000   0.000  -1.151 0.000   0.000   
0.000   0.000   0.000  -12.660   0.000 0.000   0.000   0.000   0.000;
 1.000   0.000   0.000   0.000   0.000   0.000   0.849 0.000   0.000   
0.000   0.000   0.000  -12.660   0.000 0.000   0.000   0.000   0.000;
 1.000   0.000   0.000   0.000   0.000   0.000  -0.151 0.000   0.000   
0.000   0.000   0.000   16.340   0.000 0.000   0.000   0.000   0.000;
 1.000   0.000   0.000   0.000   0.000   0.000  -0.151 0.000   0.000   
0.000   0.000   0.000   50.340   0.000 0.000   0.000   0.000   0.000;
 1.000   0.000   0.000   0.000   0.000   0.000  -2.151 0.000   0.000   
0.000   0.000   0.000  -35.660   0.000 0.000   0.000   0.000   0.000;
 1.000   0.000   0.000   0.000   0.000   0.000  -1.151 0.000   0.000   
0.000   0.000   0.000   59.340   0.000 0.000   0.000   0.000   0.000;
 1.000   0.000   0.000   0.000   0.000   0.000  -0.151 0.000   0.000   
0.000   0.000   0.000   25.340   0.000 0.000   0.000   0.000   0.000;
 1.000   0.000   0.000   0.000   0.000   0.000  -1.151 0.000   0.000   
0.000   0.000   0.000   32.340   0.000 0.000   0.000   0.000   0.000;
 1.000   0.000   0.000   0.000   0.000   0.000  -2.151 0.000   0.000   
0.000   0.000