<>
*************
clear*
//gen replicable data
set seed 1001
set obs 1000
gen x=rnormal()
//get xtile
xtile xtilex=x, nq(3)
//get corresponding pctiles
pctile pctilex=x, nq(3)
//see the cutpoints
ta pct
//see whether result correct
table xtilex, contents(freq min x max x)
*************
HTH
Martin
-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Miranda Kim
Gesendet: Dienstag, 21. Juli 2009 13:22
An: [email protected]
Betreff: st: cut points resulting from xtile
How can I extract the cut points resulting from xtile to know how to
label the categories?
xtile vit3=vitalit, nq(3)
Thanks for your help!
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/