Bookmark and Share

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]

st: AW: Creating Dummys from a variable with 5 categories


From   "Meulemann Max" <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: AW: Creating Dummys from a variable with 5 categories
Date   Mon, 3 Dec 2012 13:57:05 +0000

Shouldnt 

tab myvar, gen(dummy) 

do the trick? She will have dummies for all 5 categories considering the missing values?

Max

-----Ursprüngliche Nachricht-----
Von: [email protected] [mailto:[email protected]] Im Auftrag von Sharon Brody
Gesendet: Sonntag, 2. Dezember 2012 09:27
An: [email protected]
Betreff: st: Creating Dummys from a variable with 5 categories

Hi

I have a variable with 5 answers and need to make a dummy variable from it

The question asked - How are you charged for your waste:
1. Flat Fee
2. Weight or Volume
3. Frequency
4. Not Charged
5. Dont Know

If I want to create a dummy variable that uses Flat Fee as a reference point

1. How do I create a dummy (I have tried the basic way - gen XXXX =1 replace XXXX=0 if YYYY=>2) but I believe this is incorrect as it doesnt incorporate all the variables.

2. How do I get Stata 12 to use "Flat Fee" as the reference base point 

I am a beginner to statistics so please use simple terminology. Thank You

Sharon

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/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/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index