Hi,
I have a panel data (firm-year level). Anyone knows how to construct Peer firm average, which is the average of all firms within an industry-year combination, excluding the ith observation (excluding the focal firm and only include all the other firms in the industry)? Industries are defined by 3-digit SIC codes.
I only know how to calculate the average of all the firms in the industry. bys sic3 year: egen PeerAverage=mean(Variable).
Thanks in advance!
Related Posts with Peer firm average
New version of xtdcce2 and xtcd2. New package xtcse2Thanks to Kit Baum a new version of xtdcce2 and xtcd2 is available on SSC. In addition a new program…
cox regression with shared frailty or vce clusterHello, In running a cox regression model (stcox), I would like to look at within group correlation.…
Generating a new variable as a result of comparing the mean of a variable (t-test) in two different timesHi, I have three variables here in my example, as described below. 1) EXP: is the time dummy variab…
generate variable: birth order of children (ages 0 to 17) in householdHello I am using the South African NIDS (National Income Dynamic Survey) wave 1 to wave 5. I have s…
Create mean variables of a subgroup for the whole groupDear all, I have data on education attainment per year and state and I want to compute the percenta…
Subscribe to:
Post Comments (Atom)
0 Response to Peer firm average
Post a Comment