Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Zhang Fanfan <zffddff@gmail.com> |
To | statalist@hsphsun2.harvard.edu |
Subject | st: cut into groups |
Date | Sun, 25 Aug 2013 21:37:20 +1000 |
Hi al, I want to cut my data based on the var -ttpr-. While by using pctile and list pcitle, I got the following percentile: +--------+ | p_ttpr | |--------| 1. | 0 | 2. | 0 | 3. | 0 | 4. | 0 | 5. | 0 | |--------| 6. | 0 | 7. | .01 | 8. | 2.481 | 9. | 27.044 | 10. | . | +--------+ Then how can I use cut comments to get 0-30% and 70%-100% two groups? egen gp=cut(ttpr),at(0 0 0.01 43039) cannot work. Thanks Fanfan. * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/faqs/resources/statalist-faq/ * http://www.ats.ucla.edu/stat/stata/