Hello, I have a variable called "GapfromMedian" (which represents the gap of Leverage that an industry has from the median of the industry)
and a dummy variable named "industry" (which represents the industry in which the firm evolves). From these variables I would like to create a dummy (awayfrom) which takes value :
1, if "GapfromMedian" is <p25 or =>p75
0, if "GapfromMedian" is >=p25 and <p75
To sum up, I have 48 industries, so 48 industries median. Every firm in an industry which is <p25 or =>p75 will have to take value 1 in the new "awayfrom" variable.
If that can help you feel free to look at the attachments.
and a dummy variable named "industry" (which represents the industry in which the firm evolves). From these variables I would like to create a dummy (awayfrom) which takes value :
1, if "GapfromMedian" is <p25 or =>p75
0, if "GapfromMedian" is >=p25 and <p75
To sum up, I have 48 industries, so 48 industries median. Every firm in an industry which is <p25 or =>p75 will have to take value 1 in the new "awayfrom" variable.
If that can help you feel free to look at the attachments.
Comment