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 find lag of a variable in long format panel dataset?I have a dataset akin to this User Date Value A 2012-01-01 4 A 2012-01-02 5 A 2012-01-03 6 A 2012-0…
Create a new column using a column of 1 and 0.Hello! I'd like to ask for advice. I have the following data: I want to make a "var2" using "var1". …
stata commandI have several observations (individuals) with each belong to a household (so each has a household I…
qreg alternate solutions exists - retrieve solutionsHi, I am running a simple quantile (median) regression that has a dummy variable on the RHS. The y-…
New program -ineqdecgini- (Gini coefficient and its subgroup decomposition) now available on SSC-ineq …
Subscribe to:
Post Comments (Atom)
0 Response to Creating dummy variable based on percentiles
Post a Comment