I am wondering what is the correct way to divide a sample into 10 deciles
based on the value of variable xyz. What I would do is:
sort xyz
gen decile=group(10)
The 'group' function wil divide the sample into 10 as-nearly equal size
subgroups. Given the variable in interest is sorted beforhand, it looks fine
to me. I am not sure whether this is the right way. Is there any other more
accurate way to do the job?
Another question is that I just upgraded from STATA7 to STATA9. I couldn't
find explanation on function 'group' in STATA9 manuals or online document.
The 'group' function under 'generate' still works as under STATA7 though. I
am wondering whether 'group' is called another name under STATA9.
Shourun
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/