Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: generating categorical variables


From   Lars Korsholm <[email protected]>
To   [email protected]
Subject   Re: st: generating categorical variables
Date   Wed, 13 Aug 2003 11:59:22 +0200 (MEST)

Dear Lindsey

tjeck out 
recode and autocode (under functions)
and the command xtile


you could allso write a script using the locals after tabstat
if you know what locals are.

Kind reagards
Lars




On Tue, 12 Aug 2003, Lindsey Jeanne Leininger wrote:

> I apologize for posting a basic question.
> 
> I am trying to generate a categorical variable from a continuous variable. I 
> would like the category endpoints to be the 25% percentile, the 50% percentile, 
> the 75% percentile, and the 100% percentile. 
> 
> I can do this interactively by typing tabstat var, stats(p25, p50, p75, max) 
> and then using the gen command to manually enter what the tabstat command 
> output. However, I would like to automate the process. Does anyone know the 
> code for this?
> 
> Any help would be much appreciated!!
> 
> -Lindsey Leininger
> -- 
> Lindsey Jeanne Leininger
> Ph.D. student
> University of Chicago, Harris School of Public Policy Studies
> [email protected]
> 
> 
> 
> *
> *   For searches and help try:
> *   http://www.stata.com/support/faqs/res/findit.html
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
> 

............................................
: Lars Korsholm Ph.D.,                     :
:  Department of Statistics                :
:  University of Southern Denmark          :
:  Sdr. Boulevard 23A, 2.                  :
:  DK-5000 Odense C                        :
: Phone   +45 6550 3608                    :
: Mobil   +45 3033 3617                    :
: Fax     +45 6595 7766                    :
: Mail    [email protected]              :
: Web     http://www.isd.sdu.dk/~korsholm  :
:..........................................:


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index