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: mean centering


From   "JVerkuilen (Gmail)" <jvverkuilen@gmail.com>
To   statalist@hsphsun2.harvard.edu
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
<richardwilliams.ndu@gmail.com> 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:
*   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