Hi Jorge,

I got an error in the correction, and I can't find a way out.
this is the cmd I use:
-------------
[Y,mri] = fs_read_Y('.../thickness-sm10.mgh');
Qdec = fReadQdec('.../LME.dat');
Qdec = rmQdecCol(Qdec,1);
sID = Qdec(2:end,1);
Qdec = rmQdecCol(Qdec,1);
M = Qdec2num(Qdec);
ni = [2 2 ... 2];
X = [ones(length(M),1) M M(:,1).*M(:,2)];
[stats,st] = lme_mass_fit_vw1(X,[1],Y,ni,lhcortex);
CM.C = [0 0 0 1];
fstats = lme_mass_F1(stats,CM);
fs_write_fstats(fstats,mri,'.../lh.sig.mgh','sig');
nv = length(stats);
Beta2 = zeros(1,nv);
Beta4 = zeros(1,nv);
for ....
.
.

end;
Beta2_Beta4_sum = Beta2+Beta4;
mri1 = mri;
mri1.volsz(4) = 1;
fs_write_Y(Beta2,mri1,'..../Beta2.mgh');
[detvtx,sided_pval,pth] = lme_mass_FDR2(fstats.pval,fstats.sgn,lhcortex,0.05,0);
fs_write_Y(sided_pval,mri1,'.../spval.mgh');

??? Error using ===> reshape
To RESHAPE the number of elements must not change.

Error in ==> fs_write_Y at 21
save_mgh(reshape(Y',mri.volsz),fname,mri.M,mri.mr_parms);
-------------

the cmd: [detvtx ....] didn't work, but there was no error message. I remember in the past this cmd took around 1 day to analyze but now it didn't work at all.

fs_write_Y worked fine for Beta, also this time I used the mri1 = mri cmd - so the reshape error shouldn't be associated with this.

Please help !

best regards,

Alex.