Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


[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 <nguyen@scranton.edu>
To   statalist@hsphsun2.harvard.edu
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/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index