Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

Re: st: centred mean age


From   David Hoaglin <dchoaglin@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: centred mean age
Date   Thu, 31 Jan 2013 22:09:35 -0500

Dear Tom,

If we assume, for purposes of discussion, that instability of the
various estimates is not a problem, some straightforward algebra
should show how the coefficients in the model with centered age are
related to the coefficients in the model with uncentered age.

I am not sure which model is which, because you labeled both as "the
uncentred model".  Also, you did not include the constant term.

Let's look at the cubic term when age is centered at a0:

(age - a0)^3 = age^3 - 3*a0*age^2 + 3*(a0^2)*age - a0^3

(you can expand the quadratic and linear terms in centered age
similarly, as well as the various interaction terms).  Because the
centered model and the uncentered model both contain the cubic,
quadratic, and linear terms and the corresponding interactions and the
constant, they yield the same fit to the data.  The coefficient of the
cubic term in age is the same in the two models.  From the expanded
form of the cubic term above, we can see how centering produces
changes in the coefficients of the quadratic, linear, and constant
terms.  If you expand all the predictors in the centered model, apply
the coefficients for that model, and collect like terms, you should
get the coefficients in the uncentered model.

David Hoaglin

On Thu, Jan 31, 2013 at 4:13 AM, Thomas Norris <T.Norris2@lboro.ac.uk> wrote:
> Dear Nick, Rich and David and statalisters,
>
> Thank you very much for your advice. If I may clarify just so I can progress without doubt. I found that the best fitting multilevel model for my prenatal weight dataset was a cubic polynomial (tried fracpolys and spline). I then decided to centre the age term as it is not intuitive to have an intercept at 0 as, in prenatal life,  there should be nothing at zero.
>
> I have created a dummy variable for ethnicity, to see if there are differences between two ethnic groups, and interacted this with age (pakage, pakage2,pakeage3) and centred age (in the centred model).
>
> The coefficients in the uncentred model were:
> Age: 0.256372
> Age2: -0.0009669
> Age3= -0.0000291
> Pak= -0.5843112
> Pakage= 0.0617149
> Pakage2= -0.0021505
> Pakage3= 0.0000234
>
> In the uncentred model:
> Age: 0.1062287
> Age2: -0.0037464
> Age3= -0.0000291
> Pak= -0.0427686
> Pakage= -0.0039254
> Pakage2= 0.0000899
> Pakage3= 0.0000234
>
> As people have since told me, it is fine that the coefficients change value after the centreing, but the interactions between age and age2 and ethnicity have switched from positive to negative and vice versa, after centreing. Is this what one would expect?
>
> Many thanks,
>
> Tom

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


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index