On Mon, May 2, 2011 at 9:09 PM, Douglas N
Greve <
greve@nmr.mgh.harvard.edu
<mailto:
greve@nmr.mgh.harvard.edu>>
wrote:
I think the problem may be that your data are "badly
scaled"
meaning that one column is much greater than another
column. Try
dividing the ICV by 1e6 and see if you get more
similar results.
doug
soft.join Huang wrote:
Doug,
Thanks for your reply.
I recalculated the beta value and got the same
results as the
Matlab does, but be different from the
mri_glmfit's. I can not
figure out where the problem is.
Details following:
I use the command
mri_glmfit --table lh.volume.txt --fsgd
volume.gender.fsgd doss --C gender.diff.mtx
--glmdir lh.vol.glmdir
to finish regression analysis. and got the
beta value (
beta1 = 1.9781e+03, beta2 = 2.0639e+03, beta3 =
110.9220,
beta4 = 5.1964e-04 ) from beta.mgh file.
Using X.mat file and the same dependent
variable Y.mat as
mri_glmfit's, I got totally different results in
Matlab( beta1
= 5.19e+02, beta2 = 4.44e+02, beta3 = 90.32,
beta4 = 0.0015 ).
I don't know how it happened...
Hope for your reply.
The data I used are all in the attachment.
Best Regrads,
Lijie Huang
On Fri, Apr 29, 2011 at 9:45 PM, <
greve@nmr.mgh.harvard.edu
<mailto:
greve@nmr.mgh.harvard.edu>
<mailto:
greve@nmr.mgh.harvard.edu
<mailto:
greve@nmr.mgh.harvard.edu>>>
wrote:
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
<mailto:
Freesurfer@nmr.mgh.harvard.edu>
<mailto:
Freesurfer@nmr.mgh.harvard.edu
<mailto:
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.
-- Douglas N. Greve, Ph.D.
MGH-NMR Center
greve@nmr.mgh.harvard.edu
<mailto:
greve@nmr.mgh.harvard.edu>
Phone Number: 617-724-2358 Fax: 617-726-7422
Bugs:
surfer.nmr.mgh.harvard.edu/fswiki/BugReporting