Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Merging w/ substituting for years with missing values


From   Leoni Linek <[email protected]>
To   [email protected]
Subject   st: Merging w/ substituting for years with missing values
Date   Fri, 02 Aug 2013 17:24:39 +0200

I'm merging two panel datasets (A and B), one of which has few years (A, I only need those), while the other has observations for many years (B) -- but also has missing values for some of them. As most of the variables that have missing values don't change a lot, I want to tell STATA to use values from previous or following years (from B) if they're missing for the exact year I need (those in A). This sounds rather messy but is there an elegant way of doing this in STATA?

Any help is much appreciated.

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


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index