Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Command related to putting categories into separate columns


From   Ziad El-Khatib <[email protected]>
To   [email protected]
Subject   Re: st: Command related to putting categories into separate columns
Date   Sat, 19 Jul 2008 00:12:32 -0700

Yep that was the one, thank you!
best regards
ziad


On Sat, Jul 19, 2008 at 12:05 AM, Olalekan Uthman <[email protected]> wrote:
> Hi,
>
> Try
>
> tab education, gen(education)
>
> OR
>
> xi i.education
>
>
> Olalekan Uthman
>
>
>
> --- On Sat, 7/19/08, Ziad El-Khatib <[email protected]> wrote:
>
>> From: Ziad El-Khatib <[email protected]>
>> Subject: st: Command related to putting categories into separate columns
>> To: [email protected]
>> Date: Saturday, July 19, 2008, 7:53 AM
>> Hi!
>> I used to recall this command and I have been trying to
>> figure it out
>> again for 10 days now, so gave up and will try to put it on
>> the list
>> for tips?
>>
>> I have variable 'education' with 4 levels of
>> education: lev1, lev2,
>> lev3 and lev4
>> The one line command can create new variables: _lev1,
>> _lev2, _lev3 and
>> _lev4  with values (0/1)
>>
>> I know I could do gen _lev1=1 if education==lev1 etc... but
>> I thought
>> it will be nice to just use one liner for it.
>>
>> Thank you in advance and best regards
>> ziad
>> *
>> *   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/
>



-- 
Ziad El-Khatib
AIDS Unit
National Institute for Communicable Diseases (NICD)
1 Modderfontein Road
Private Bag X4, Sandringham, 2131
Johannesburg, South Africa
Mobile: +27 (0) 72-52 39 716
Phone: +27 (0) 11-386 6433
Fax (NICD): +27 (0) 11 386 6453
Fax (connected to my email): +27 (0) 86 18 2871
http://www.nhls.ac.za/div_nicd.html

Division of International Health (IHCAR)
Department of Public Health Sciences
Karolinska Institute
Nobels v�g 9
SE-171 77
Stockholm, Sweden
Landline (connected to Skype):+46 (0) 8-559 21 659
Fax: +46 (0) 8-311590
http://ki.se/ki/jsp/polopoly.jsp?d=18835&l=en



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