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
How to identify variable in various rows index_admit patient_id afib newafib varnewafib 1 001 0 0 1 0 001 1 1 0 0 001 1 0 0 0 001 …
Simulating data for non linear regressionI wish to model a function with the nl command: Code: nl (Y = {b1}*X2^{b2}*X3^{b3}) or Code: nl (l…
Swapping male/female as base category in earnings regression modelIn an earnings regression (log linear, i.e. coefficient is an approximate % change), with gender why…
Firms characteristics matching with announcement datesDear Statalists: I am doing a research on the determinants of securities offering choices (Season e…
Lagged Loop Command Only Producing One RegressionHi there, I am attempting to write a loop command in order to run nine separate lagged regressions. …
Subscribe to:
Post Comments (Atom)
0 Response to Creating dummy variable based on percentiles
Post a Comment