Bookmark and Share

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: RE: A Question on Selecting a Sample from a Panel Data Set


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   st: RE: A Question on Selecting a Sample from a Panel Data Set
Date   Tue, 15 Jun 2010 22:23:25 +0200

<>


If your dataset looks like this:

***********
clear*

set obs 19
gen int year=_n+1986

//10 firms
expand 10
bys year: gen byte firm =_n
gen byte derivuse=runiform()>.25 if year==2000
***********

you can simply condition on -if derivuse==1- in your analyses.


HTH
Martin

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Hong Nguyen
Sent: Dienstag, 15. Juni 2010 22:13
To: [email protected]
Subject: st: A Question on Selecting a Sample from a Panel Data Set

Hi!

I have a panel data set consisting of financial data for 423 firms over 
a 19-year period.  For one of the years (2000) I have data on 
derivatives use (use or non-use) for these 423 firms. I need to generate 
a sample of firms that used derivatives in 2000 and use it to run 
regressions over the entire period 1987-2005. This is where I'm stuck.

Thanks!
Hong V. Nguyen
*
*   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/

*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index