Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | hnbc1 <hnbc1.reg@gmail.com> |
To | statalist@hsphsun2.harvard.edu |
Subject | st: how to construct change in earnings since last election |
Date | Fri, 10 Feb 2012 17:07:37 -0600 |
Hi all, my question is as follows: Suppose we have a panel dataset like County Earnings Votes Change_in_earnings_since_last_election 1 10 3 . 1 20 . . 1 30 . . 1 40 4 1 2 20 . . 2 30 4 . 2 40 . . 2 50 3 -1 3 30 1 . 3 40 2 1 3 50 . . 3 60 4 2 The time dimension is year. We don't have votes every year because counties don't have elections every year. The variable I want to construct is Change_in_earnings_since_last_election. As is shown in the table, only the last observation of county 1, 2, 3, and the second observation of county 3 have nonmissing data for this variable. How can I do this systematically? Thank you very much. Paul * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/