From | Nick Winter <[email protected]> |
To | [email protected] |
Subject | Re: st: filling previous missing observations repeatedly. |
Date | Mon, 12 Jul 2004 12:42:41 -0400 |
>>--------------------------------------------------------
>>
Thanks a lot for your solution. In fact, this is exactly what I did and it is working fine.
Dev
>>> [email protected] 07/12/04 04:59pm >>>
Why not try using what you had for the observations after 1999, then a
reverse sort and a similar command for prior to 1999.
eg:
. replace B=B[_n-1]*C if B==. & year>1999 & country=="Belgium"
. gsort country -year
. replace B=B[_n-1]/C if B==. & year<1999 & country=="Belgium"
Dev Vencappa wrote:
>>>
>>>
>>>
>Stata users, I have the following data set
>
>year B C Country
>1995 . x Belgium
>1996 . x Belgium
>1997 . x Belgium
>1998 . x Belgium
>1999 x x Belgium
>2000 . x Belgium
>2001 . x Belgium
>2002 . x Belgium
>
© Copyright 1996–2024 StataCorp LLC | Terms of use | Privacy | Contact us | What's new | Site index |