Sorry for the bombardment of e-mails...!
but I just ran a little "contained" test comparison to see the effect of mean centering a single variable

Using the same data as above, I ran mri_glmfit with a custom design matrix containing only one continuous variable (N), once with the raw values, and a second time with the values mean centered (demeaned). The contrast vector was simply [1].

The raw values resulted in essentially the entire brain lighting up as yellow, whereas the mean centered values resulted in no significant areas whatsoever. (please see attached images)
Thus, it seems as though mri_glmfit does not like mean centered values! Why is this?

Returning to my general problem (from the previous e-mails):
Alternatively, the root of my problem may be stemming from the fact that when I ran mris_preproc, I specified a fsgd file containing the raw values of the continuous variables. When I ran mri_glmfit, I specified a custom design matrix (and not an fsgd, since this conflicted and resulted in an error), containing mean centered values. Are the values from the fsgd and custom design matrix conflicting?
(I left the values in the fsgd non-mean centered because I would rather view the raw values on subsequent plots)

Thanks for listening!

On Tue, Apr 15, 2008 at 1:52 PM, Jerry Yeou-Wei Chen <jyw.chen@utoronto.ca> wrote:
By the way, I noticed that in the output for QDEC, there is a line that states:
 "INFO: NOT demeaning continous variables"
Is this message related to mri_glmfit? Does it normally try to demean the continuous variables before fitting the model? or is there a flag to set this?
I am wondering about this both in the context of QDEC, and running the group analysis via command line.

On Tue, Apr 15, 2008 at 11:27 AM, Jerry Yeou-Wei Chen <jyw.chen@utoronto.ca> wrote:
I'm not sure if this clarifies the situation for you, but those images were generated from the same contrast, for the corresponding design. More specifically, the contrast was [0 -1 1 0 0 0 0 0 0].
We did not add a second column for the other group, because our understanding is that that would cause the design to be unstable since the two columns for the groups would be completely colinear...


On Mon, Apr 14, 2008 at 11:39 AM, Doug Greve <greve@nmr.mgh.harvard.edu> wrote:
Sorry, I can't tell from the design matrix what it is you are trying to test. Looks like the 1st col is 0 or 1 and so probably models a group effect, but I don't see another col to model the other group.


Jerry Yeou-Wei Chen wrote:
Hi,
I have a follow up question regarding mean-centering / demeaning regressors.
I ran the same analysis with demeaned and non-demeaned regressors.
(More specifically,
the "demeaned" design consisted of: one regressor for gender, and 3 demeaned regressors for main effects, and 1 demeaned regressor for an interaction effect.
the "non-demeaned" design consisted of the same regressors, except the main effects were not demeaned.)

>From what I understand, demeaning should not affect the parameter estimates. So, I was surprised when the results differed drastically between these two designs. The demeaned design resulted in essentially no significant blobs, whereas the non-demeaned design resulted in much much more blobs.

I have attached the design matrices and example images of the results.

- Jerry

On Thu, Apr 10, 2008 at 2:48 PM, Doug Greve <greve@nmr.mgh.harvard.edu> wrote:
You can enter mean-centered (demeaned) values into the fsgd, but be aware that this is something that you usually do not want to do (though maybe ok for an interaction term?). Below is something I posted a few weeks ago on this subject.

doug

The important idea here is the difference between computing/testing
the mean response and computing the intercept. The intercept is only
meaningful when a continuous variable is present. When you do a
statistical test, the results will be different for two possible
reasons:

1. The statistical efficiencies are different (due to correlations
   caused by the non-zero mean of the continuous variable), which will
   reduce significance. This is always the case.

2. The values being tested (ie, the mean vs the intercept) are
   possibly different. I say "possibly" here because, scientifically
   speaking, there may be no effect of your continuous variable, in
   which case it would not add to the overall mean.

In my opinion, the most appropriate way to analyze the data is to
leave the means in your continuous variables (ie, do not
demean). Here's why. When you believe that a variable is important
scientifically, you posit a model with a population effect
(parameterized by an intercept) and the continuous variable
(parameterized by a slope). BOTH OF THESE PARAMETERS ARE INDEPENDENT
OF THE SAMPLE YOU HAVE CHOSEN. Therefore, when you perform statistical
tests on these parameters, your results are independent of your sample
-- very important when doing science! In contrast, the mean of your
sample may be dependent on the sample you have chosen, and so
statistical tests may only then apply to your sample.

For example, if age adds to the hemodynamic response (HRF), older
subjects will have a larger amplitude to their HRF. Let's say you
perform an experiment on a group of subjects and find that their mean
HRF is significantly different than 0. Someone else tries to replicate
your experiment and can't. Upon further examination, your sample was
somewhat older than the other which caused your sample to have a
higher mean and so achieve significance. When both sets are reanalyzed
using age as a nuisance variable, the results are the same.

This does not necessarily mean you should not demean your variables,
but you just have to be careful what conclusions you draw from
it. Note: this applies to variables and regressors -- don't demean
your observed raw data (unless you know what you are doing).



Jerry Yeou-Wei Chen wrote:
Hello,

Are regressors mean centered for mri_glmfit?
Judging by one of my previous Xg.dat files, it does not appear so.

If not, I plan to manually enter my design matrix, with mean centered regressors.
Do I need to enter the corresponding values in the FSGD file as mean centered? or can they remain non- mean centered?

Thanks,
- Jerry

_______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

-- 
Douglas N. Greve, Ph.D.
MGH-NMR Center
greve@nmr.mgh.harvard.edu
Phone Number: 617-724-2358 
Fax: 617-726-7422

In order to help us help you, please follow the steps in:
surfer.nmr.mgh.harvard.edu/fswiki/BugReporting

    








-- 
Douglas N. Greve, Ph.D.
MGH-NMR Center
greve@nmr.mgh.harvard.edu
Phone Number: 617-724-2358 
Fax: 617-726-7422

In order to help us help you, please follow the steps in:
surfer.nmr.mgh.harvard.edu/fswiki/BugReporting