NaN will not work for this. You can't do incomplete designs with an FSGD. You 
can create your own design matrix and pass it with --X, otherwise you'll have 
to exclude those subjects or put some reasonable (eg, imputed) value

On 1/12/2021 6:35 PM, Julie Ottoy wrote:

        External Email - Use Caution

Hi freesurfer experts,

I am trying to run a GLM fit between cortical thickness and some other 
continuous marker. My cortical thickness were stacked before using the 
mris_preproc and surf2surf commands.
I have an FSGD file with the same subjects as used during the stacking of the 
thickness maps, but I added a new continuous regressor (my independent variable 
of interest). However, some subjects have a missing value for this regressor, 
so I added NaN. This makes me run into the following error. When I replace the 
NaN values by random numbers in the FSGD, it all runs fine.

M = [ ...
 1.00000  0.99577  0.70711  0.98278  0.97547 -0.97111      nan
 0.99577  1.00000  0.70628  0.97775  0.97819 -0.95833      nan
 0.70711  0.70628  1.00000  0.68252  0.70488 -0.70032      nan
 0.98278  0.97775  0.68252  1.00000  0.95399 -0.96466      nan
 0.97547  0.97819  0.70488  0.95399  1.00000 -0.92863      nan
-0.97111 -0.95833 -0.70032 -0.96466 -0.92863  1.00000      nan
     nan      nan      nan      nan      nan      nan      nan  ]
Normalized matrix condition is 1e+08
Design matrix ------------------
<design matrix>
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.


I made sure that my FSGD file does not have any weird characters, so i applied 
the cat fsgd.txt | sed 's/\r/\n/g' > new.fsgd.txt, but this also didn't help.

Thank you for your help,
Julie





_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu<mailto: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

Reply via email to