Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: mean centering and interaction effects


From   Maarten buis <[email protected]>
To   [email protected]
Subject   Re: st: mean centering and interaction effects
Date   Fri, 23 Jan 2009 12:42:59 +0000 (GMT)

I stupidly forgot to add the main effect foreign in this example. Once
I have done that, the test statistics remain unchanged by mean
centering. (Main lesson: I shouldn't do any consulting while finishing
my dissertation)

*--------- begin example ---------
sysuse auto, clear
gen wXf = weight*foreign
reg mpg weight wXf foreign

sum weight, meanonly
gen c_weight = weight - r(mean)

gen c_wXf = c_weight*foreign
reg mpg c_weight c_wXf foreign
*----------- end example ------------

--- Maarten buis <[email protected]> wrote:

> I received a question from a collegue that completely puzzled me. He
> has a regression model with an interaction effect. When he
> mean-centered his variables (and recreated the interaction effects)
> the
> test statistics (t-value and p-value) changes quite a bit. I did not
> expect this to happen as mean-centering is just a linear
> transformation. I recreated this behavior in the example below. Does
> anyone have an idea what is causing this?
> 
> -- Maarten
> 
> *-------- begin example ----------
> sysuse auto, clear
> gen wXf = weight*foreign
> reg mpg weight wXf
> 
> sum weight, meanonly
> gen c_weight = weight - r(mean)
> 
> gen c_wXf = c_weight*foreign
> reg mpg c_weight c_wXf
> *--------- end example -----------
> (For more on how to use examples I sent to the Statalist, see
> http://home.fsw.vu.nl/m.buis/stata/exampleFAQ.html )
> 
> 
> -----------------------------------------
> Maarten L. Buis
> Department of Social Research Methodology
> Vrije Universiteit Amsterdam
> Boelelaan 1081
> 1081 HV Amsterdam
> The Netherlands
> 
> visiting address:
> Buitenveldertselaan 3 (Metropolitan), room N515
> 
> +31 20 5986715
> 
> http://home.fsw.vu.nl/m.buis/
> -----------------------------------------
> 
> 
>       
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
> 


-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands

visiting address:
Buitenveldertselaan 3 (Metropolitan), room N515

+31 20 5986715

http://home.fsw.vu.nl/m.buis/
-----------------------------------------


      
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index