Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: samplig firms in a panel and reconciliation of samples


From   "Austin Nichols" <[email protected]>
To   [email protected]
Subject   Re: st: samplig firms in a panel and reconciliation of samples
Date   Thu, 9 Nov 2006 09:52:48 -0500

D. West--
I will assume both var1 and var2 are RHS vars, and you are not
proposing to select on the dependent var...

webuse grunfeld
egen m1=mean(invest), by(company)
egen medm1=median(m1)
gen hi1=m1>medm1 if !mi(m1, medm1)
egen m2=mean(kstock), by(company)
egen medm2=median(m2)
gen hi2=m2>medm2 if !mi(m2, medm2)
gen both_hi=(hi1==1 & hi2==1)

ignores trends and other subtleties, but does roughly what you seem to want.

On 11/9/06, [email protected] <[email protected]> wrote:
Dear Stata users,

I'm a beginner with Stata and I am wondering if any of you may help me to make subsamples of HIGH and LOW firms (in terms of "var1" and then of "var2") in a panel data analysis. My unbalanced panel is made up of a lot of variables, an "id" (fro 1 to 200) and a "year" variable (1995 to 2005, but some years may not be available).
Well, the sample splits should be achieved as follows: each firm assigned to a high (or low) category according to the firm's "var1" median characteristics (measured over time) compared with the median characteristics of all firms. Again in terms of "var2". After the two columns (of 1 and 0) are made (please, tell me how according to these sample splitting...) are performed, I would include only those firms that are common to the two samples (e.g. HIGH var 1 and HIGH var 2). Can anyone help me with the commands?
Thank you very much,

D.



------------------------------------------------------
Nuovo MOTOROLA MOTOKRZR K1. Superficie a specchio, fotocamera da 2 Megapixel e lettore MP3 integrato.Clicca e vinci !
http://click.libero.it/motorola9nov



*
*   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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index