Statalist


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

Re: st: RE: Re: Lags and panel data


From   Michael Hanson <[email protected]>
To   [email protected]
Subject   Re: st: RE: Re: Lags and panel data
Date   Mon, 15 Jun 2009 19:49:01 -0400

Jenniffer,

Can you type -xtset- in the Stata Command window and then copy and paste the results into an e-mail reply? My conjecture is that you have non-consecutive years, and the command -tsset ... , yearly- that you issued tells Stata that it should expect observations in consecutive years for the purposes of lagging, etc.

If you want to treat, for example, data in 2003 as the first lag of data in 2005, then you should use -xtset [i variable] [t variable], delta(n)-, where n = the number of years that separate the two years in your sample. (Note: "n" in the -xtset- command should be an actual number, not the letter "n"! In the example I gave, n = 2.)

Hope this helps,
Mike

On Jun 15, 2009, at 2:03 PM, Solorzano Mosquera, Jenniffer wrote:

Yes. It does, but actually when I try without any additional calculation
or generation of variables... There Is no observations...

xi: xtabond res2 capacita SFTPW USFTPW FTNPW TFTW ptemporales inno
gradolic i.ISIC


xi: xtabond res2 l(0/1).capacita l(0/1).ptemporales, lags(1)
no observations
r(2000);

All variables are for two periods (years)


-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Martin Weiss
Sent: Monday, June 15, 2009 1:47 PM
To: [email protected]
Subject: st: Re: Lags and panel data

<>

Does -xtabond- not calculate the lags needed for its purposes on the
fly?

***
webuse abdata, clear
keep n w k ys yr1980 yr1981 yr1982 yr1983 yr1984 year id xtabond n
l(0/1).w l(0/2).(k ys) yr1980-yr1984, lags(2)
***


HTH
Martin
_______________________
----- Original Message -----
From: "Solorzano Mosquera, Jenniffer" <[email protected]>
To: <[email protected]>
Sent: Monday, June 15, 2009 7:40 PM
Subject: st: Lags and panel data


Hi!

I've been trying to set my dataset as panel data with

tsset idstd_2003 year , yearly

And then try to calculate lags for different variables an use the
xtabond estimation method. But when I try to generate the lag for the
dummy variable "capacita"...

g lagcapacita = l.capacita

...I just get missing values.

I have a panel of 1173  firms for 2 years.
Could anyone tell me what it could be  possibly wronged? Thanks!
*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index