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

Re: st: filling in missing observations in a panel


From   Neil Shephard <[email protected]>
To   [email protected]
Subject   Re: st: filling in missing observations in a panel
Date   Mon, 19 Dec 2005 21:20:07 +0000

On 12/19/05, Scott Cunningham <[email protected]> wrote:
> I have a county-level dataset like the following, which has missing
> county ID characteristics.
>
> COUNTY ID | COUNTY | YEAR
> 001                | Lincoln     | 1992
> 001                | Lincoln     | 1993
> .                      | Lincoln     | 1994
> 001                | Lincoln     | 1995
>
> I need to find all missing observations in the "County ID" column,
> and replace them with the appropriate value.  I know this is simple,
> but have forgotten how.
>

The FAQ listeed at the bottom of every post has details of the
statalist archives where you may well have found the earlier
exchange....

On 12/19/05, n j cox <[email protected]> wrote:
> This is an FAQ.
>
> How can I replace missing values with previous or
> following nonmissing values?
> http://www.stata.com/support/faqs/data/missing.html
>
> . search replace
>
> would have pointed you towards this FAQ.
>
>> Panos Sousounis
>>
>> in a panel data context, is there a way of replacing the value of a variable
>> in period t with the value of the variable in previous periods (t-1,
>> t-2...etc)? I have a situation where the item is recorded as missing  if the
>> status of the respondent has not changed since first asked. I need a way of
>> the variable in the current period to take the last valid (non missing)
>> value of the previous time periods.


--

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