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]

From |
Morten Støver <morten.stover@ntnu.no> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: Change reference group in logistic regression |

Date |
Fri, 04 Feb 2011 09:03:53 +0100 |

Thanks! Morten S Michael N. Mitchell wrote:

Dear MortenIf you are using Stata 11, you can get rid of the xi: prefix andspecify the omitted group like this...logit foreign ib3.rep78which says that -rep78- is an indicator variable, and the baseline(omitted) group is 3. Or you can saylogit foreign ib4.rep78 and the fourth group is the omitted group.The -fvset- command can be used to permanently change the referencegroup (like the -char- command).I hope that helps, Michael N. MitchellData Management Using Stata -http://www.stata.com/bookstore/dmus.htmlA Visual Guide to Stata Graphics -http://www.stata.com/bookstore/vgsg.htmlStata 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/

-- Morten Støver MA, PhD Student Department of Public Health and General Practice

Medisinsk teknisk forskningssenter N-7489 Trondheim Tel +47 73597525 * * 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/

**Follow-Ups**:**Re: st: Change reference group in logistic regression***From:*Neil Shephard <nshephard@gmail.com>

**References**:**Re: st: Change reference group in logistic regression***From:*Maarten buis <maartenbuis@yahoo.co.uk>

**Re: st: Change reference group in logistic regression***From:*"Michael N. Mitchell" <Michael.Norman.Mitchell@gmail.com>

- Prev by Date:
**st:ODDSRISK module and continous covariates** - Next by Date:
**Re: st: Change reference group in logistic regression** - Previous by thread:
**Re: st: Change reference group in logistic regression** - Next by thread:
**Re: st: Change reference group in logistic regression** - Index(es):