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: AW: RE: Seasonal Dummies and Autocorrelation

 From "Martin Weiss" To Subject RE: st: AW: RE: Seasonal Dummies and Autocorrelation Date Sat, 24 Jul 2010 15:17:45 +0200

```<>

I did not advocate this strategy in
http://www.stata.com/statalist/archive/2010-07/msg01226.html, just wanted to
show the different error messages that would be returned under different
scenarios.

HTH
Martin

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Christopher Baum
Sent: Samstag, 24. Juli 2010 15:05
To: statalist@hsphsun2.harvard.edu
Subject: re: st: AW: RE: Seasonal Dummies and Autocorrelation

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

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