Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: A Previous Question on Selecting Sample from Panel Data
From
Hong Nguyen <[email protected]>
To
[email protected]
Subject
st: A Previous Question on Selecting Sample from Panel Data
Date
Fri, 18 Jun 2010 10:05:22 -0400
Hi!
The procedure (that is,
bysort firm (derivuse) : replace derivuse = derivuse[1] ==1) seems to
work, but somehow not quite.
I have 19 years (YEARID=1987, 1988, ..., 2005 already in the data set)
of financial data for 423 firms set up as panel data, each firm with a
unique GVKEY. For 2000 and 2001 only, I have a variable called
INTERESTONLY, which is either 1 or 0 for these 423 firms. What I want to
do is to pick observations for a sample of firms where INTERESTONLY=1
(in 2000 only or in 2001 only, or in either), and spread them to all
other years.
I hope this makes things clearer as to what I have and what I'd like to
be able to do.
Thanks!
Hong
*
* 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/