Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

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

st: RE: two "novice" questions

From   "Fernando Rios Avila" <>
To   <>
Subject   st: RE: two "novice" questions
Date   Mon, 18 Jul 2011 21:20:23 -0400

Hi Duckhye Yang,
For the first part, u can use the following code:
Gen sex1=0 if sex=="F"
Replace sex1=1 if sex=="M"
For the second part, what I would do is to create the dummy variables:
Tab age, gen(age_)
This would create the variables age_1 age_2  age_3, each one representing
your different groups.
Then in your probit model, you just skip the category you want to use as

-----Original Message-----
[] On Behalf Of Duck-Hye Yang
Sent: Monday, July 18, 2011 9:09 PM
Subject: st: two "novice" questions

Dear Statalist,
I have sex variable where F and M exist.
I'd like to change the variable name to female where 1=F and M=0. Female
should be numeric variable. 
I have age variable, which is categorical variable (1=infant,... 5=18+).
When I ran a logit model, I found that 1 is reference category. How can I
make 5 reference category?
Sorry that I ask too-easy questions. I am a novice user of stata. I really
want a try!
Duckhye Yang

*   For searches and help try:

*   For searches and help try:

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