Hi Vivian
The error you are getting means that the number of elements of your contrast vector is not the same as the number of columns of your design matrix. I think you're trying to apply the contrast matrix shown in the wiki page example to the sample dataset that we distribute with lme. That is incorrect. Note that the example in the wiki has four groups while the sample dataset only contains the data for two groups.
Best -Jorge
----- Mensaje reenviado -----
De: Jorge jbernal@nmr.mgh.harvard.edu Para: jbernal0019@yahoo.es Enviado: Domingo 29 de septiembre de 2013 23:24 Asunto: Fwd: Re: LME Guide + Developer Build
-------- Original Message -------- Subject: Re: LME Guide + Developer Build Date: Sun, 29 Sep 2013 17:55:24 +0200 From: Vivian R. Steiger vivianroger.steiger@uzh.ch To: Jorge jbernal@nmr.mgh.harvard.edu
Hi Jorge
I think its not a programming bug itself but an error in the text of the mass univariat example on the website:
http://surfer.nmr.mgh.harvard.edu/fswiki/LinearMixedEffectsModels
Perfoming all steps until doing fine but:
CM.C = [zeros(3,5) [1 0 0 0 0 0 0;-1 0 0 1 0 0 0;0 0 0 -1 0 0 1] zeros(3,5)]; F_lhstats = lme_mass_F(lhstats,CM);
generates the following error in matlab:
Error using lme_mass_F (line 49) The number of colums in the contrast matrix CM(1).C is different from the corresponding number of fixed effects in stats(1).Bhat
Cheers
Vivian
Am 26.09.2013 um 16:58 schrieb Jorge jbernal@nmr.mgh.harvard.edu:
Yes, please send your questions to the Freesurfer's mailing list.
Why do you think there is a bug in the inference step? Could you please send me the prompted error that you are getting and a snapshot of the cmd you typed and of the result of “whos” Matlab cmd?
To test an omnibus F-contrast containing several rows you simply create the contrast matrix CM.C with one row for each individual contrast and then pass it on to lme_mass_F, eg.
F_lhstats = lme_mass_F(lhstats,CM);
Unlike the univariate setting, in the mass-univariate
setting a structure array CM is passed on to the inference function instead of a plain matrix C because someone might be interested in using different contrasts across different vertices like CM(1).C, CM(2).C, ...(though unusual). If you are using the same contrast across vertices then you simply define CM.C and it will be used for all vertices.
Eg. CM.C = [0 0 0 0 1 0 0 0; 0 0 0 0 0 0 0 1] for
an F-test and
CM.C = [0 0 0 0 1 0 0 0] for a T-test Best -Jorge
On 09/26/2013 08:06 AM, Vivian R. Steiger wrote:
Hi Jorge
First of all thank you for your detailed response. We appreciate that you took time to answer us back.
We've already done the tutorial with the ADNI dataset provided on the website, which worked quite well except of the part with CM.C where we think could be a bug.
We eager to learn and process the lme for our structural dataset not just the t1-based but the dti as well and therefore we are interested in any new modelling toolboxes and paper dealing with lme survival analysis. We would be more than happy to beta-test such upcoming tools.
The problem that we have right now is the adaptational steps from the tutorial to our own dataset and structure. Should we post such questions in the mailinglist or could we might ask you for some support? Normally a more direct path of q+a provides a better, faster and even more successful way to a solution :)
Thank you for our time
Best,
Vivian
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@nmr.mgh.harvard.edu