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: [email protected]
[mailto:[email protected]] On Behalf Of Nick Cox
Sent: Friday, June 21, 2002 12:39 AM
To: [email protected]
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
[email protected]
*
* 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/