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

Re: st: Converting string variable name into numbers


From   "Eric G. Wruck" <ewruck@econalytics.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Converting string variable name into numbers
Date   Fri, 13 May 2005 12:38:31 -0400

What is this <slist> command?  My Stata 9.0 said unrecognized command when I tried it & couldn't find anything with help either.

Thanks,

EGW



>Just add a -gen- option after -tab-:
>
>. list Language
>
>     +----------+
>     | Language |
>     |----------|
>  1. |  English |
>  2. |  English |
>  3. |  Spanish |
>  4. |  Spanish |
>  5. |  Spanish |
>     |----------|
>  6. |   French |
>  7. |  English |
>  8. |   French |
>     +----------+
>
>. tab Language, gen(language_dummy)
>
>   Language |      Freq.     Percent        Cum.
>------------+-----------------------------------
>    English |          3       37.50       37.50
>     French |          2       25.00       62.50
>    Spanish |          3       37.50      100.00
>------------+-----------------------------------
>      Total |          8      100.00
>
>. slist
>
>     Language  language_dummy1  language_dummy2  language_dummy3
>  1.  English                1                0                0
>  2.  English                1                0                0
>  3.  Spanish                0                0                1
>  4.  Spanish                0                0                1
>  5.  Spanish                0                0                1
>  6.   French                0                1                0
>  7.  English                1                0                0
>  8.   French                0                1                0
>
>..
>
>rafal
>
>================
>Rafal Raciborski
>Graduate student
>Department of Political Science
>Emory University
>301 Tarbutton Hall
>1555 Dickey Drive
>Atlanta, GA 30322
>404-378-9826 (home)
>rafal.raciborski@emory.edu (e-mail)
>www.roofoos.net


-- 

===================================================

       Eric G. Wruck
       Econalytics
       2535 Sherwood Road
       Columbus, OH  43209

       ph:      614.231.5034
       cell:    614.330.8846
       eFax:    614.573.6639
       eMail:   ewruck@econalytics.com
       website: http://www.econalytics.com

====================================================
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index