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/