Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: Durbin on ALL series in a panel


From   Kit Baum <baum@bc.edu>
To   "Christensen, Robert K" <rokchris@indiana.edu>
Subject   st: Re: Durbin on ALL series in a panel
Date   Wed, 3 Aug 2005 10:54:14 -0400

You just need to write a wrapper that executes the test for each unit of the panel. Optionally, save the r() values that you want to tabulate for each unit and store them in additional variables, or in elements of a matrix. See below for the first strategy.

In Stata 9 the command estat dwstat handles gaps in panels, and does so properly. It does NOT treat 1986-1988 as one year time span. Stata commands either refuse to work with gaps in time series or do the right thing.

webuse grunfeld,clear
replace invest=. in 5
replace invest=. in 195
g dw=.
g ngap=.
forv i=1/10 {
qui {
reg invest mvalue kstock if company==`i'
estat dwatson
replace dw=r(dw) in `i'
replace ngap=r(N_gaps) in `i'
}
}
list dw ngap in 1/10



Kit Baum, Boston College Economics
http://ideas.repec.org/e/pba1.html


On Aug 3, 2005, at 10:43 AM, Christensen, Robert K wrote:


Greetings,

I'm in the throws of some research and have become overwhelmed by some
questions. I found http://ideas.repec.org/c/boc/bocode/s435102.html
<http://ideas.repec.org/c/boc/bocode/s435102.html> to be quite useful,
but several questions remain:

I am wondering whether there are any Stata tests for autocorrelation for
an entire panel (124 series within the panel)?

The modules at: http://ideas.repec.org/c/boc/bocode/s435102.html seem
to be only for one series within the panel. If you're unaware of a
box-ljung / durbin's h test for all series in a panel, would I have to
perform the test for each series individually?

What if my model is as such?

Yt-Yt-1 = B + Xt + Xt-1 + Xt-2 . . .

Finally - do you know what Stata does with missing values in such tests
(e.g., time series is 1968-1988 but 1986 is a year with no measurement
-- all missing values). Does it pretend that year doesn't exist and
treat 87 and 88 as consecutive?

Thanks in advance for your help. I met with our stat-math lab
consultants yesterday and they didn't know what to tell me.

Rob

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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   |   What's new   |   Site index