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: linear, quadratic terms and centering


From   "Michael N. Mitchell" <[email protected]>
To   [email protected]
Subject   Re: st: linear, quadratic terms and centering
Date   Sat, 21 Aug 2010 01:43:12 -0700

Dear Fabio

  You were correct when you wrote...

Or do I first center the linear term and calculate the square term on the basis of the "centered" linear term ?

  Or, in Stata, you can do this (say you want to center -x- around 100)...

generate xcentered = x - 100
regress y c.xccentered##c.xccentered

  That -regress- command will include -xcentered- as well as the squared term.

Hope this helps,

Michael N. Mitchell
Data Management Using Stata      - http://www.stata.com/bookstore/dmus.html
A Visual Guide to Stata Graphics - http://www.stata.com/bookstore/vgsg.html
Stata tidbit of the week         - http://www.MichaelNormanMitchell.com



On 2010-08-21 12.40 AM, Fabio Zona wrote:
Dear Statalist,

a very simple question: I have

y = c + x0 + x1 + x1square

In order to center x1 and x1square, do I first need to calculate the square term and afterwards to center both the linear and the quadratic term around their respective means?
Or do I first center the linear term and calculate the square term on the basis of the "centered" linear term ?

I guess that the first alternative works.

Thanks

*
*   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/
*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index