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" <>
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.


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
>-----Original Message-----
>From: Jeph Herrin <>
>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:

© Copyright 1996–2022 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index