Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | jpitblado@stata.com (Jeff Pitblado, StataCorp LP) |
To | statalist@hsphsun2.harvard.edu |
Subject | Re: st: set reference dependent var category in longitudinal mlogit panel |
Date | Tue, 13 Aug 2013 22:27:08 -0500 |
Jason Bond <jbond@arg.org> is using -gsem- and wants to change the base outcome for a multinomial logit model: > I'm trying to estimate a longitudinal multinomial panel model using gsem. > The default dependent variable reference category is the first.is there an > easy way to change this to a different category? 'baseoutcome(x)' is not > allowed as an option and 'char depvar[omit] x' doesn't do anything. Jason can use the 'b' operator to specify the base outcome for a multinomial logit outcome variable in -gsem-. The 'b' operator is part of factor variables notation, see -help fvvarlist-. In the following Stata log we use level 3 as the base for outcome 'insure'. This example is based on '[SEM] example 37g'. ***** BEGIN: . webuse gsem_sysdsn1 (Health insurance data) . gsem (b3.insure <- i.nonwhite) Iteration 0: log likelihood = -556.59502 Iteration 1: log likelihood = -551.78935 Iteration 2: log likelihood = -551.78348 Iteration 3: log likelihood = -551.78348 Generalized structural equation model Number of obs = 616 Log likelihood = -551.78348 ------------------------------------------------------------------------------ | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- 1.insure <- | | 1.nonwhite | -.3779586 .407589 -0.93 0.354 -1.176818 .4209011 _cons | 1.941934 .1782185 10.90 0.000 1.592632 2.291236 -------------+---------------------------------------------------------------- 2.insure <- | | 1.nonwhite | .2828627 .3977302 0.71 0.477 -.4966742 1.0624 _cons | 1.754019 .1805145 9.72 0.000 1.400217 2.107821 -------------+---------------------------------------------------------------- 3.insure | (base outcome) ------------------------------------------------------------------------------ ***** END: --Jeff jpitblado@stata.com * * 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/