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]
Re: st: categorize variables basaed on percentitles
From
Nick Cox <[email protected]>
To
[email protected]
Subject
Re: st: categorize variables basaed on percentitles
Date
Wed, 1 Feb 2012 09:20:58 +0000
I don't know how anyone could express it more clearly than the help
and manual entry for -pctile-.
See the advice in the FAQ at
http://www.stata.com/support/faqs/res/statalist.html#stata
"Say exactly what you typed and exactly what Stata typed (or did) in
response. N.B. exactly!"
Nick
On Wed, Feb 1, 2012 at 3:29 AM, KiDeuk Kim <[email protected]> wrote:
> 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/
*
* 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/