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
Get the standard error from --exlogistic-- command?Hi all, I'm running the exlogistic command for meta-analysis, with id as study id: Code: exlogist…
Graph with Y axis as stringHi everyone, I have data like below: 25 different methods that generate 25 different estiamtion on …
svy: mean and sorting estimated meansGreetings, Statalisters. I'm hoping this is something someone is willing and able to explain to me,…
multilevel multinomial modelling using the gllamm command in stataGood day everyone, I am using the gllamm command in stata 15.0 for multilevel (2-leveled) multinomia…
Changing the value of many observationsHello So, i'm working on a pretty big dataset for a Norwegian insurance company, and I wanted to ch…
Subscribe to:
Post Comments (Atom)
0 Response to Creating dummy variable based on percentiles
Post a Comment