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

st: Re: Lagged independent variables & panel data


From   "R.E. De Hoyos" <[email protected]>
To   <[email protected]>
Subject   st: Re: Lagged independent variables & panel data
Date   Mon, 17 May 2004 15:14:50 +0100

Cordula,

You can create the lagged values. After tsset:

gen lagvar = l.var
gen dlagvar = l2.var

And then include them as regressors in xtreg.

xtreg depvar lagvar dlagvar ...

To know more about <xtserial>, read (as cited in the help file for
<xtserial>):

Drukker, D. M. 2003.  Testing for serial correlation in linear panel-data
models.  Stata Journal (3)2: 168-177.

As you pointed out, there are several ways of correcting for autocorrelation
and <xtabond> is one of them.

Rafa

----- Original Message -----
From: "Cordula Stolberg" <[email protected]>
To: <[email protected]>
Sent: Monday, May 17, 2004 2:06 PM
Subject: st: Lagged independent variables & panel data


> Hi all,
>
> I have a question about a panel data model. I want to estimate a
regression
> containing lagged x's, but no lagged y's, i.e.
>
>  frag fdi l.fdi l2.fdi & some dummies
>
> I'm not sure how to do that with Stata. As far as I can see, the xtabond
> command is only for dynamic panel data models with lagged dependent
> variables. I've tried the usual xtreg..., but then Stata tells me that I
> can't use time series operators. Does anyone know the command I should
use?
>
> Moreover, I have a question with regard to the xtserial command. I've used
> it for a random effects model (I had already detected heteroskedasticity)
> and have found autocorrelation. How do I then correct for that? I know
> there are the various xtgls commands to correct for autocorrelation, but
> I'm not sure which type of autocorrelation xtserial is referring to.
>
> Sorry for the long mail & thanks for you help,
> Cordula
> *
> *   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/
>
*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index