Hi Elijah 

You are getting NaNs
because the rows of your Qdec variable (except the first) are already
numeric values instead of strings. You just need to do this:

Qdec
= Qdec(2:end,:);


The variable Y has
the data that you already read with:

[Y, mri] =
fs_read_Y('lh.thickness_sm10.mgh');

Best
-Jorge


>________________________________
> De: Elijah Mak <fk...@medschl.cam.ac.uk>
>Para: jorge luis <jbernal0...@yahoo.es> 
>CC: Freesurfer support list <freesurfer@nmr.mgh.harvard.edu> 
>Enviado: Lunes 14 de julio de 2014 9:35
>Asunto: Re: [Freesurfer] LME Longitudinal QDEC Table
> 
>
>
>Hi Jorge,
>
>
>Many thanks for getting back. 
>
>
>What I have done is to create the table in excel (Mac version), before pasting 
>the entire table into a program (gedit) and then saving the file as 
>qdec.table.dat. This has worked for me in the past when I am running QDEC 
>analyses. I have also pasted the table from excel into a text editor (pico) in 
>my Mac terminal.
>
>
>I have tried to modify the Qdec variable in Matlab by simply pasting the excel 
>table and it appears to work (Please see attached screenshot of the Qdec 
>variable). The resulting sID variable is correct while the Qdec table now only 
>contains the relevant variables and covariates (years, group, gender and age) 
>after I ran these commands:
>
>
>Qdec = rmQdecCol(Qdec,1); (removes first column)
>
>sID = Qdec(2:end,1); (grabs the subjects' IDs)
>Qdec = rmQdecCol(Qdec,1); (removes the subjects'ID column)
>
>
>However, when I run try to convert Qdec into a numeric matrix with M = 
>Qdec2num(Qdec); the resulting M variable only consists of NaNs (Please see 2nd 
>screenshot).
>
>
>Lastly, for  next step ([M,Y,ni] = sortData(M,1,Y,sID), am I supposed to 
>define Y?
>
>
>Many thanks again for your help! 
>
>
>Best Wishes,
>Elijah
>
>
>
>
>
>
>
>
>
>On Mon, Jul 14, 2014 at 2:18 PM, jorge luis <jbernal0...@yahoo.es> wrote:
>
>
>>Hi Elijah
>>
>>
>>
>>
>>This is  happening because the columns of your Qdec table file are separated 
>>by tabs or something else. You need to use simple spaces instead or properly 
>>modify fReadQdec to support tabs. This is something I need to fix on github: 
>>
>>
>>
>>https://github.com/NeuroStats
>>
>>
>>
>>
>>
>>Best
>>-Jorge
>>
>>
>>
>>
>>
>>
>>>________________________________
>>> De: Elijah Mak <fk...@medschl.cam.ac.uk>
>>>Para: freesurfer@nmr.mgh.harvard.edu 
>>>Enviado: Viernes 11 de julio de 2014 17:44
>>>Asunto: [Freesurfer] LME Longitudinal QDEC Table
>>> 
>>>
>>>
>>>Hello Freesurfer Experts,
>>>
>>>
>>>I am performing a mass-univariate analyses using the LME toolbox for 
>>>longitudinal studies.
>>>
>>>
>>>After running both mris_preproc  and mri_surf2surf , I load the 
>>>lh.thickness_sm10.mgh file using  
>>>
>>>
>>>[Y,mri] = fs_read_Y('lh.thickness_sm10.mgh');
>>>
>>>
>>>Next, I run the following command:
>>>Qdec = fReadQdec('qdec.table.dat');
>>>However, it seems that the output is entirely in string format "166 x 1 
>>>cell". The first row reads as "'fsidfsid-baseyearsgroupgenderage'" in a 
>>>single column.
>>>Because of this, I am running into problems when I try to execute the 
>>>following steps:
>>>Qdec = rmQdecCol(Qdec,1); (removes first column)
>>>sID = Qdec(2:end,1); (grabs the subjects' IDs)
>>>Qdec = rmQdecCol(Qdec,1); (removes the subjects'ID column)
>>>M = Qdec2num(Qdec); (converts to a numeric matrix)
>>>[M,Y,ni] = sortData(M,1,Y,sID); (sorts the data)
>>>Your help will be greatly appreciated!
>>>Many thanks.
>>>Best Regards,
>>>Elijah
>>>
>>>
>>>-- 
>>>
>>>Elijah Mak, Gates Scholar
>>>PhD Candidate | Psychiatry
>>>
>>>University of Cambridge
>>>
>>>Trinity College, Cambridge, CB2 1TQ
>>>
>>>
>>>_______________________________________________
>>>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.
>>>
>>>
>>>
>
>
>
>-- 
>
>Elijah Mak, Gates Scholar
>PhD Candidate | Psychiatry
>
>University of Cambridge
>
>Trinity College, Cambridge, CB2 1TQ
>
>
>
>_______________________________________________
>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


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.

Reply via email to