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

st: RE: lagging variables in 3-dim unbalanced panel w/ gaps


From   "helen milner" <[email protected]>
To   <[email protected]>
Subject   st: RE: lagging variables in 3-dim unbalanced panel w/ gaps
Date   Thu, 20 Jun 2002 14:22:06 -0700

Dear Statalisters,

I am trying to find a way to lag variables in a 3 dimensional panel
dataset.  I have 25 countries each with unique election dates from
1945-98 (day-month-year in stata format) and each with political
parties. On average, each party has gone thru 15 elections, and I want
to use a party's score from the last election to predict something about
the way it behaves in the current election. 
The problem seems to be that the election dates are unique to each
country and have gaps within them (i.e., US presidential elections occur
every four years). When I try to use the L1 command after tsset-ing the
data ("tsset pty edate"), Stata creates a variable with 0 observations.
I have been doing the lagging manually, but that is cumbersome and
error-prone. Is there some way to get Stata(v7) to lag the variables?

Thanks for any help.

Helen Milner
Columbia University



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

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