Hi Eric,

I just came across your old email, have you ever figured it out?
You don't need to compute ni beforehand, it is computed in sortData.

This is what it says in the help:
ni: Vector (mx1, m # of subjects in the study) whose entries are the number of repeated measures for each subject (ordered according to sX and sY).

Something about your input is wrong, to cause the weird error message you are getting. It would be good to know what it is, so we can maybe have a more meaningful message in the future. Maybe M, Y (first dimension) and sID don't have the same length? Although that is checked in the script. If you can't figure out what was wrong with your inputs, maybe you can send me your M, Y and sID and I'll take a look.

Thanks, Martin


On 02/05/2014 09:34 PM, jorge luis wrote:
Hi Eric

The meaning of the variable ni is explained in the header of each script that have it either as an input or output. But you can also download the sample data from the wiki page (ftp://surfer.nmr.mgh.harvard.edu/pub/data/long_mixed_effects_tools-data.tar.gzwhere you will find instances of that variable and how it relates to the design matrix.

Best
-Jorge


El Miércoles 5 de febrero de 2014 20:40, Eric Cunningham <etc42@hawaii.edu> escribió:
Hello Freesurfer Experts,

I am currently trying to run the Linear Mixed Effects Models described in the wiki here:
http://surfer.nmr.mgh.harvard.edu/fswiki/LinearMixedEffectsModels

And I am running into difficulties that are fairly well described by the last message in this previous mail thread:
Can you please clarify the variable "ni"? 

the following command:
[M,Y,ni] = sortData(M,1,Y,sID);
results in:
??? Error: File: sortData.m Line: 59 Column: 6
Expression or statement is incorrect--possibly unbalanced (, {, or [.

do i need to build "ni" ahead of time?

You probably don't need to know this, but I am using data generated by Freesurfer version 5.1, on matlab 7.8.0 (R2009a), which I gather will cause a few problems further down the line. 

Thank you for your help,
-Eric

_______________________________________________
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

-- 
Martin Reuter, Ph.D.
Assistant in Neuroscience - Massachusetts General Hospital
Instructor in Neurology   - Harvard Medical School
MGH / HMS / MIT

A.A.Martinos Center for Biomedical Imaging
149 Thirteenth Street, Suite 2301
Charlestown, MA 02129

Phone: +1-617-724-5652
Email: 
   mreuter@nmr.mgh.harvard.edu
   reuter@mit.edu
Web  : http://reuter.mit.edu