Quantcast
Channel: Statalist
Viewing all articles
Browse latest Browse all 72764

Creating medians per industry group in a panel data set

$
0
0
Dear all,

We are having some problems calculating a variable. What we would like to do is the following: the median industry book leverage.

This could be done in the following way:
  1. We would like Stata to identify the different industries we have defined on the basis of sic codes
    (for example 1 industry sic 4000-4900)

    The full list is the following:
    (sic, "0100","0900")
    (sic, "1000","1400")
    (sic, "1500","1700")
    (sic, "2000","3999")
    (sic, "4000","4900")
    (sic, "5000","5100")
    (sic, "5200","5900")
    (sic, "7000","8900")
    (sic, "9100","9900")
  2. Thereafter, we would like Stata to calculate the median of book leverage of every sic-industry group.

    What is the best way to do this?
    generate new variables or is there a stata shortcut?


    Thank you in advance.

Viewing all articles
Browse latest Browse all 72764

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>