This is an FAQ.
FAQ . . . . . . . . . . . . . . . . . . . . . . . Replacing missing values
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . N. J. Cox
2/03 How can I replace missing values with previous or
following nonmissing values?
http://www.stata.com/support/faqs/data/missing.html
See also David Kantor's convenience command -carryforward- (SSC).
Nick
njcoxstata@gmail.com
On 5 April 2013 05:34, Alison McCarthy <statslearner@live.com> wrote:
> I have cross-sectional time series dataset of unemployment, occupation (when employed), and health. There are about 10,000 people and 10 years.
>
> I want to examine whether a persons last observed occupation influences their health when unemployed. At the moment, there are missing values for occupation if a person is unemployed. I would like to replace these missing values with their last observed occupation.
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/