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

Re: st: Replacing current period values with the values of previousperiods


From   n j cox <[email protected]>
To   [email protected]
Subject   Re: st: Replacing current period values with the values of previousperiods
Date   Mon, 19 Dec 2005 15:08:49 +0000

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