Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: cut into groups
From
Zhang Fanfan <[email protected]>
To
[email protected]
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/