Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: superposed rolled windows


From   "Eric G. Wruck" <[email protected]>
To   [email protected]
Subject   Re: st: superposed rolled windows
Date   Tue, 27 Jun 2006 10:42:16 -0400

That's why Jeph had the statement

  drop if profit2 == .

except that I think it should have read

  drop if profits3 == .


This will include only those observations that have a profit for this year & the following two.  Per Nick's recommendation, you should also give some serious thought to gaps in profit data for a given firm.

Eric


p.s.  Jeph, what is the meaning of HTH?


>But i dont want all the observations
>for example if a firm has observations for 1990-2004 the new database will
>have observations for 1990-2002. In the same way for a firm with data for
>1990-1995 will have observations for 1990-1993
>Thanks
>
>-----Original Message-----
>From: Jeph Herrin <[email protected]>
>To: [email protected]
>Date: Tue, 27 Jun 2006 10:17:23 -0400
>Subject: Re: st: superposed rolled windows
>
>> Try
>>
>>   gen profits1=profits
>>   bys firms (years): gen profits2=profits[_n+1]
>>   bys firms (years): gen profits3=profits[_n+2]
>>   drop if profit2==.
>>
>> HTH,
> > Jeph
>>


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