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]
Re: st: Change reference group in logistic regression
From 
 
"Michael N. Mitchell" <[email protected]> 
To 
 
[email protected] 
Subject 
 
Re: st: Change reference group in logistic regression 
Date 
 
Thu, 03 Feb 2011 11:37:08 -0800 
Dear Morten
  If you are using Stata 11, you can get rid of the xi: prefix and specify the omitted 
group like this...
logit foreign ib3.rep78
  which says that -rep78- is an indicator variable, and the baseline (omitted) group is 
3. Or you can say
logit foreign ib4.rep78
  and the fourth group is the omitted group.
The -fvset- command can be used to permanently change the reference group (like the -char- 
command).
I hope that helps,
Michael N. Mitchell
Data Management Using Stata      - http://www.stata.com/bookstore/dmus.html
A Visual Guide to Stata Graphics - http://www.stata.com/bookstore/vgsg.html
Stata tidbit of the week         - http://www.MichaelNormanMitchell.com
On 2011-02-03 6.57 AM, Maarten buis wrote:
--- On Thu, 3/2/11, Morten Stover wrote:
I want to change reference group doing a logistic
regression analysis on highest level of education and
future work disability. The data is coded 1=primary,
2 =secondary and 3=tertiary, and I would like tertiary
to be the reference group. I've done this in cox
regression using char and [omit], but I can't get this
to work in log reg.
I am assuming you are using the -xi- prefix. I cannot
replicate your problem. The example below works as
expected.
*--------- begin example ----------
sysuse auto, clear
recode rep78 1/2=3
char rep78[omit] 5
xi: logit foreign i.rep78
*----------- end example -----------
Can you change the example above such that it reproduces
your problem? Seeing the problem on your own computer in
examples like that really help in diagnosing the problem.
-- Maarten
--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany
http://www.maartenbuis.nl
--------------------------
*
*   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/