Bookmark and Share

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

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

Re: st: mean centering

From   "JVerkuilen (Gmail)" <>
Subject   Re: st: mean centering
Date   Mon, 21 Jan 2013 11:32:40 -0500

On Mon, Jan 21, 2013 at 10:35 AM, Richard Williams
<> wrote:
> With regards to computational issues I have seen instances where even Stata
> chokes on an X^2 term, e.g. year^2. Rescaling the variable or centering it
> seems to help.

Yes, the QR decomposition is mighty but if you have four digit years
and square them, it's going to get bad, and it'll get even worse if
you happen to have some variables out in the decimals, too. This is
especially true in models such as Poisson or logistic regression,
where the exponential term will overflow way before a linear model
will due to the exp(.) term.

Polynomials should almost always be done as an orthogonal basis, or at
least as close to an orthogonal basis as is reasonable. Given that
many students won't really know what that means, the easiest thing to
tell them is (a) center on a meaningful number and possibly rescale by
dividing by a convenient unit and (b) generate polynomial terms from
the centered value.

Pure orthogonalization helps (if it is possible) because then you can
easily test for the necessity of the probably impossible to interpret
higher order terms.

I wish I had course time for regression splines....
*   For searches and help try:

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