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: AW: RE: Seasonal Dummies and Autocorrelation
From
Christopher Baum <[email protected]>
To
<[email protected]>
Subject
re: st: AW: RE: Seasonal Dummies and Autocorrelation
Date
Sat, 24 Jul 2010 09:05:29 -0400
<>
There is, btw, no need to store the mean in a variable (I believe Martin suggested that). It is a number, so keep it in a local.
Note also that in the IMEUS example, the regression is run with a constant term. In your original analysis, you included (I presume) seven day-of-week dummies, but tested 6 of them. This makes no particular sense. If a full set of dummies is included (and a constant term is omitted) the coefficients are the conditional daily means. If you leave one out, they are the _differences_ between the conditional mean and that of the excluded day. It then makes sense to jointly test them vs. zero.
-----------------
use http://fmwww.bc.edu/ec-p/data/Mills2d/exchd.dta, clear
// assign arbitrary day numbers
g dow = mod(day,7)
tsset day
// regress exchd on lags and daily 'seasonal' factors
// include the constant, as the factor variable dow will leave out one level
reg exchd L(1/6).exchd i.dow
// test for significance of autoregressive effects
testparm L(1/6).exchd
// test for daily seasonality
testparm i.*
predict double exhat, residual
su exchd, mean
replace exhat = exhat + r(mean)
su
tsline exchd exhat
-------------------
Kit
Kit Baum | Boston College Economics & DIW Berlin | http://ideas.repec.org/e/pba1.html
An Introduction to Stata Programming | http://www.stata-press.com/books/isp.html
An Introduction to Modern Econometrics Using Stata | http://www.stata-press.com/books/imeus.html
*
* 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/