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: Controlling for median via industry
From
"Peter Miller" <[email protected]>
To
[email protected]
Subject
st: Controlling for median via industry
Date
Wed, 12 Feb 2014 10:09:10 +0100 (CET)
Dear Stata-Community,
I’ve a problem, which I can’t figure out for quite some while. Maybe one of you has an idea how to solve this problem.
Here is the setting: I’ve a large sample of firms each identified with an ID, Date, Industry and Earnings for example. For each firm now, I have to control the earnings by the median earnings of the particular industry the firm belongs to.
For example: Firm X belongs to Industry Y then it should be something like this:
Adjusted earnings = Earnings firm X – Median of Industry Y
In addition, the groups that build the median should have at least 15 firms, are not allowed to be older than 5 years compared to firm X, and they are not allowed to be younger, i.e. they should not exist before firm X.
I struggle with it for quite some while. Any help would be much appreciated!!!
Best regards,
Peter
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/