Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: categorize variables basaed on percentitles


From   Nick Cox <njcoxstata@gmail.com>
To   statalist@hsphsun2.harvard.edu
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 <kideuk@yahoo.com> 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/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index