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
National level survey dataHello, I have a national level survey dataset. On household level, it has around 5988 observation. B…
Possible to put interaction terms of X and indictors of Y quintile in a regression?Dear Statalist users, I am wondering if I would estimate a regression like this: Y = X + X * Y_Q2 …
Creating 5 mutually non-exclusive groupsI have the dataset on employment sector of households as; A. Wage in agri B. Wage in non agri C. Sel…
graph export, as(pdf) fails to add special characters in the graph legend if inside {fontface "...": ...}Hi, I am trying to export a plot where I include special characters in the legend while I also set t…
how to replace/recode variables that are a multiple of some numberHi I have a variable "level" that ranges from 1 to 125 I would like to recode it into a variable "pi…
Subscribe to:
Post Comments (Atom)
0 Response to Peer firm average
Post a Comment