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!