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, is already up and running.

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

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, just wanted to
show the different error messages that would be returned under different


-----Original Message-----
[] On Behalf Of Christopher Baum
Sent: Samstag, 24. Juli 2010 15:05
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, 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)
tsline exchd exhat


Kit Baum   |   Boston College Economics & DIW Berlin   |
                              An Introduction to Stata Programming  |
   An Introduction to Modern Econometrics Using Stata  |

*   For searches and help try:

*   For searches and help try:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index