I had a question about xtile in Stata.
I have an array of 254 numbers( from 0.282 to 2.403 but they have random increments). I need to split this into quintiles, that is split at approximately 20% cutoffs.
Right now my code looks like
where VPeps is the number array. I want to get 5 equal tiles but it seems that Stata gives me funky quintiles.
In Q5 (top quintile), there are 28 numbers
in Q4 68 numbers
in Q3 89 numbers
in Q2 53 numbers
in Q1 (bottom quintile) only 7..
Is there a way I can split the numbers so that each quintile has 20% of the data?
Thanks,
I have an array of 254 numbers( from 0.282 to 2.403 but they have random increments). I need to split this into quintiles, that is split at approximately 20% cutoffs.
Right now my code looks like
Code:
xtile quintileVPeps=VPeps, n(5)
In Q5 (top quintile), there are 28 numbers
in Q4 68 numbers
in Q3 89 numbers
in Q2 53 numbers
in Q1 (bottom quintile) only 7..
Is there a way I can split the numbers so that each quintile has 20% of the data?
Thanks,
Comment