Hi Everyone,
I have a variable G-Index with the following distribution:
Governance |
Index |
(Gompers, |
Ishii, |
Metrick) | Freq. Percent Cum.
------------+-----------------------------------
1 | 1 0.02 0.02
2 | 9 0.14 0.16
3 | 55 0.87 1.02
4 | 161 2.53 3.56
5 | 331 5.21 8.77
6 | 549 8.64 17.41
7 | 738 11.61 29.02
8 | 857 13.49 42.51
9 | 917 14.43 56.94
10 | 803 12.64 69.58
11 | 698 10.99 80.56
12 | 521 8.20 88.76
13 | 396 6.23 95.00
14 | 189 2.97 97.97
15 | 98 1.54 99.51
16 | 20 0.31 99.83
17 | 6 0.09 99.92
18 | 4 0.06 99.98
19 | 1 0.02 100.00
------------+-----------------------------------
Total | 6,354 100.00
I am trying to create a variable treat, which is equal to 0 if the value of G-index is in the top 25% percentile and 1 if its in the bottom 75%. Can anyone help me with the proper codes for that?
Thanks!
Related Posts with Creating dummy variable based on percentiles
extracting observations with several conditionsHi I am a stata beginner. I want to extract observations satisfying several conditions but it is re…
generating a new variable using bysort in panel datasetHi there, I am currently using StataMP 15.1. I am trying to generate a new variable for the freque…
-margins,predict(pr)- after -ivprobit- yields opposite sign from coefficientsDear colleagues, I am interested in the marginal effect of the continuous endogenous regressor X1 o…
Help with Stata recognizing numbers between 0 and 1Hello, I am doing a Stata analysis using the variable; agriculture land use (agriculture land/total…
Relative changes between different levels and in different periodsHi I want to measure how many patients which, in period T, were in one of the levels of disease mov…
Subscribe to:
Post Comments (Atom)
0 Response to Creating dummy variable based on percentiles
Post a Comment