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 at the end of May, and its replacement, statalist.org is already up and running.


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

st: AW: RE: Seasonal Dummies and Autocorrelation


From   "Martin Weiss" <martin.weiss1@gmx.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: AW: RE: Seasonal Dummies and Autocorrelation
Date   Fri, 23 Jul 2010 14:19:45 +0200

<> 

Either NJC`s guess alone or a combination of my and his idea are correct,
but my suspicion that you do not have a -local- called mu was clearly wrong,
as I could have told from the error message you received:


*************
sysuse auto, clear
su  price, mean
local mu = r(mean)

//NJC`s guess: Wrong character
cap noi gen newvar='mu'

//My guess: no local mu there
ma drop _mu
cap noi gen newvar=`mu'

//combination MW and NJC
cap noi gen newvar='mu'
*************



HTH
Martin


-----Ursprüngliche Nachricht-----
Von: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Nick Cox
Gesendet: Freitag, 23. Juli 2010 14:13
An: statalist@hsphsun2.harvard.edu
Betreff: st: RE: Seasonal Dummies and Autocorrelation

You don't explain what mu is, but you may well be using the wrong
character for the left quote ` in referring to a local macro. 

The character ' looks like some poison excreted by a word processor. 

Nick 
n.j.cox@durham.ac.uk 

Beatrice Crozza

I need to calculate the autocorrelation of my variable (y) and to do a
chi-square test that the first 6 autocorrelations are zero. I want  to
take into account the seasonal effect. I constructed dummy variables
for the days of the week and they are significant.

 reg y L(1/6).y dum*, nocon

Then I performed my Chi square test  in this way:

testparm L1.y L2.y L3.y L4.y L5.y L6.y dum1 dum2 dum3 dum4 dum5 dum6

1)Is it correct?

2)I saw an example on the book "An introduction to modern econometrics
using Stata" by Christopher  Baum (pag. 175)on how to remove
seasonality and I would like to regress again my seasonal adjusted
variable to check again for independence, however, when I try to give
the command for my data:

Replace ySA= ySA + 'mu'
I receive this error message:  'mu' invalid name.


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


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