Bookmark and Share

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.


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

st: Multicollinearity and Time Trends


From   Stefan Pichler <stefan__pichler@hotmail.com>
To   Statalist <statalist@hsphsun2.harvard.edu>
Subject   st: Multicollinearity and Time Trends
Date   Wed, 11 Apr 2012 13:31:15 +0200

Dear Statalisters, 

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

Y    year    year2        year3    year1    year12    year13
5    1951    3806401    7.43e+09    1        1        1
9    1952    3810304    7.44e+09    2        4        8
7    1953    3814209    7.45e+09    3        9        27
1    1954    3818116    7.46e+09    4        16        64
3    1955    3822025    7.47e+09    5        25        125
8    1956    3825936    7.48e+09    6        36        216
9    1957    3829849    7.50e+09    7        49        343
1    1958    3833764    7.51e+09    8        64        512
2    1959    3837681    7.52e+09    9        81        729
6    1960    3841600    7.53e+09    10        100        1000

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. In my opinion in both cases collinearity should not be a problem, since there are no linear combinations that would generate another variable. Also the X`X matrix is non-singular in both cases. Therefore I am quite surprised by the first result.

Best 
 
Stefan



 		 	   		  
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index