Lijie,
I don't know what the matlab regress() function does. mri_glmfit is just solving the GLM equation, which you can do easily in matlab:
beta = inv(X'*X)*X'*y;
try that and see if you get the same as mri_glmfit.
doug
Hi all,
I'm working on a group analysis using mri_glmfit. In analysis directory, I got a X.mat file which containing the matrix X ( size 50x4 ) used to regress analysis, also the beta value from beta.mgh file. Strangely, I loaded the X.mat in Matlab and recalculated the beta using function regress in matlab, but got a different result from that of mri_glmfit. I don't know where the problem is, is there any difference in algorithm between mri_glmfit and matlab function regress( regress(Y,X) )? or I made some mistakes during the procedure. The X.mat file and the dependent variable Y.mat are in the attachment.
Thanks in advance
Lijie Huang _______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer