Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.

# Re: st: Multicollinearity and Time Trends

 From Maarten Buis To statalist@hsphsun2.harvard.edu Subject Re: st: Multicollinearity and Time Trends Date Wed, 11 Apr 2012 15:18:22 +0200

```On Wed, Apr 11, 2012 at 2:47 PM, Justina Fischer wrote:
> So the best way of indeitfying these three different trends in the same model would be to start the time trend with a minus sign, letting it cross the zero-line.

You can see what happens to the correlation between x and x^2 when you
center at different values in the code below. It starts with an x that
has the values -10 to -1 (mean -5.5), than -9.9 to -0.9 (mean -5.4),
up to 1 to 10 (mean 5.5). Notice that in the original question the "x"
ran from 1951 to 1960. If you look at the graph below and extrapolate
to those values you can imagine why that person ran into trouble...

*------------- begin example ---------------
drop _all
set obs 10
gen double x = -11 + _n
gen double y = x^2
local mid = -5.5

tempname memhold
tempfile results
postfile `memhold' mid corr using `results'
forvalues 1=0/110 {
qui {
replace x = x + .1
replace y = x^2
corr x y
local mid = `mid' + .1
post `memhold' (`mid') (`r(rho)')
}
}
postclose `memhold'
use `results', clear
twoway line corr mid, yline(0) xline(0)
*-------------- end example ----------------
(For more on examples I sent to the Statalist see:
http://www.maartenbuis.nl/example_faq )

Hope this helps,
Maarten

--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany

http://www.maartenbuis.nl
--------------------------
*
*   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/
```