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

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 14:35:44 +0200

```On Wed, Apr 11, 2012 at 1:31 PM, Stefan Pichler  wrote:
> I want to detrend time series data and allow not only for linear trends, but also for quadratic and cubic trends. Here is a minimalistic example of the data:
>
> Y...outcome variable (some randomly typed numbers)
> year....the year of the observation
> gen year2=year^2
> gen year3=year^3
>
> gen year1=year-1950 (so that year starts from 1)
> gen year12=year1^2
> gen year13=year1^3

> If I tell Stata: "reg Y    year    year2    year3", Stata omits year because of collinearity, however if I regress  "Y    year1    year12    year13" no variable is omitted.

Think of this this way: Stata can distinguish between year12 and year1
because they are non-linearly related. This non-linearity is greatest
near 0 (the minimum of the parabola). However, if you get further and
further away from 0, it becomes almost linear.

Consider these three graphs:

twoway function y = x^2, range(1951 1960)
twoway function y = x^2, range(1 10)
twoway function y = x^2, range(-4.5 4.5)

In the last graph it is easiest to distinguish x from its square. This
is true for us when we look at the graph, but also for computers.

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/
```