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]

Re: st: Change reference group in logistic regression

From   Morten Støver <>
Subject   Re: st: Change reference group in logistic regression
Date   Fri, 04 Feb 2011 09:03:53 +0100

Hello. I don't have Stata 11, but I did it like Maarten L. Buis, and it worked. Don't know what I did wrong the first time.
Morten S

Michael N. Mitchell wrote:
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 - A Visual Guide to Stata Graphics -
Stata tidbit of the week         -

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

*--------- 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

*   For searches and help try:
*   For searches and help try:

Morten Støver
MA, PhD Student
Department of Public Health and General Practice
Faculty of Medicine Norwegian University of Science and Technology
Medisinsk teknisk forskningssenter
N-7489 Trondheim
Tel +47 73597525

*   For searches and help try:

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