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:
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:
- 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") - 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.