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: categorize variables basaed on percentitles
From
KiDeuk Kim <[email protected]>
To
"[email protected]" <[email protected]>
Subject
st: categorize variables basaed on percentitles
Date
Tue, 31 Jan 2012 19:29:35 -0800 (PST)
Dear statlisters,
I have five continuous variables, var1-var5, each of which is on a different scale. I'd like to (1) obtain the percentitle for two values, say 10 and 25, on var1, (2) apply those percentitles to var2-var5 and obtain the corresponding value of each of var2-var5 for the two percentitles, and (3) categorize var2-var5 into ordinal variables (cat2-cat5) based on those values.
I tried a few different commands and user-written scripts to write this loop, but have not been successful. It'd be greatly appreciated if someone could teach me how to program this in Stata.
Thank you,
KD
*
* 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/