I'm running Stata 15.1 on OSX. I have a variable containing standardized test scores, which I'd like to either transform this variable or create another that stores them according to specific percentiles. These percentiles should correspond to a normal distribution (i.e. 0.1, 2.2, 13.6, 34.1, 34.1, 13.6, 2.2, 0.01). I know xtile can divide variables into n quintiles, but I wasn't sure how to configure it to obtain the desired cutpoints. Any help would be much appreciated. Thanks!
Sample data:
Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input float IQ
.
-1.2351986
.2448673
.4643255
1.889084
1.9801397
.1742738
.05650223
.6005792
-.4292795
1.4921693
1.6413466
1.0393566
1.959469
1.384924
.2740149
1.6423193
1.861465
.
.8555078
1.598789
1.6248794
1.418067
.8210449
.3124731
1.8996103
1.8856792
1.750537
-.5728984
-1.1765907
.
.
.
-1.2620186
.370004
.
.4827034
-1.0285945
-.54003346
-.13815095
.51066977
-.697236
-.9404569
-.18532906
.28603524
1.2402283
1.1491377
-.6110786
1.0015932
1.2627057
.
.9270393
.04326595
.
.
1.168141
-.4017995
1.7102726
1.9609627
1.4099375
1.9716977
-.20884864
1.582044
1.757659
1.138646
-.6860147
1.7665875
2.0012274
1.539278
.
1.9344207
1.3251003
1.359459
1.846144
1.423799
.013354048
1.8912725
1.4921693
1.865182
1.2632962
-.4481091
-1.3975427
-1.390664
-.7430245
-1.3885448
-1.222796
-1.0398853
1.334133
1.4794194
1.3167626
-.6799698
.06876576
-.4848997
.
-.27176437
-.1953692
.59112966
.943437
.
-.06859969
end
0 Response to Transforming Z-score variable into variable of percentile scores
Post a Comment