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

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


From   "helen milner" <hvm1@columbia.edu>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: RE: RE: lagging variables in 3-dim unbalanced panel w/ gaps
Date   Fri, 21 Jun 2002 10:30:28 -0700

Thanks for your help. I will try this.

No, I plan to use a pooled cross section.  And theoretically at least
the parties in each country are in strategic interaction, plotting their
positions relative to what the other parties are doing (or are expected
to do) in part. This is harder to model empirically. Any ideas are
surely welcome.

Helen

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Nick Cox
Sent: Friday, June 21, 2002 12:39 AM
To: statalist@hsphsun2.harvard.edu
Subject: st: RE: RE: lagging variables in 3-dim unbalanced panel w/ gaps

helen milner
> 
> 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?
 
It sounds as if there is an easy solution to part of this: 

If you create a variable from 1 up 

bysort pty (edate): gen eorder = _n 

You can then 

tsset pty eorder 

In other words, the natural metric is election number, not years. 

Are you intending that each party can be modelled 
as a separate time series, without reference to 
other parties in the same election? 

Nick 
n.j.cox@durham.ac.uk 
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index