One potential problem is that if the firms start on different years, this
will result in a cross-section with observations of different years.
Would it not easier to use an -if- qualifier in the statements you need to
test for an interaction effect?
Scott
> -----Original Message-----
> From: [email protected] [mailto:owner-
> [email protected]] On Behalf Of Nick Cox
> Sent: Monday, February 06, 2006 9:31 AM
> To: [email protected]
> Subject: st: RE: Retain only one observation for each id in an unbalanced
> panel
>
> bysort firmid (year) : keep if _n == 1
>
> Nick
> [email protected]
>
> ALICE DOBSON
>
> > I use Stata 9.1. I have an unbalanced panel of firms [firmid]
> > over several
> > years [year] and want to consider only the first year for each id.
> >
> > Basically, I need to convert the panel data into a
> > cross-sectional data to
> > test for an interaction effect.
> >
> > Could anybody please help me?
>
> *
> * 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/