Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Richard Williams <richardwilliams.ndu@gmail.com> |
To | statalist@hsphsun2.harvard.edu, "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu> |
Subject | Re: st: RE: RE: predicted probabilities of interaction term |
Date | Wed, 18 Jul 2012 12:26:05 -0500 |
At 10:49 AM 7/18/2012, Valle, Giuseppina wrote:
Thank you for your help -- I was unaware that I needed to use the subpop command when looking at the gender differences with the svy command. In terms of the postestimation commands, I have not located any syntax available that will produced predicted probabilities of the interaction terms with a mlogit. I have 4 values for "race" and 3 values for "relig." I assume that using prtab along with specified values of these two variables would not produce the estimates I am looking for, as that is the only command I have used for predicted probabilities.
If you want to get predicted values for individual cases use the -predict- command. If, on the other hand, you want to get predicted probabilities for certain combinations of values, check out the margins command. e.g. do something like
webuse nhanes2f,clear svy: mlogit health i.sex##i.race age margins race#sex, predict(outcome(1)) atmeans margins race#sex, predict(outcome(2)) atmeans margins race#sex, predict(outcome(3)) atmeans margins race#sex, predict(outcome(4)) atmeans margins race#sex, predict(outcome(5)) atmeansI believe that would more or less clone what -prtab- does, although I personally might drop the -atmeans- option.
The margins command is powerful but complicated (and also a little tedious with multiple outcome commands like mlogit). The current issue of the Stata Journal has an article on it, and there is also a handout at
http://www.nd.edu/~rwilliam/stats/Margins01.pdf
Pina Giuseppina Valle, M.S. Department of Sociology Doctoral Candidate Florida State University 526 Bellamy Building Tallahassee, FL 32306-2240 Email: gv08d@my.fsu.edu ________________________________________From: owner-statalist@hsphsun2.harvard.edu [owner-statalist@hsphsun2.harvard.edu] on behalf of William Buchanan [william@williambuchanan.net]Sent: Tuesday, July 17, 2012 5:11 PM To: statalist@hsphsun2.harvard.edu Subject: st: RE: predicted probabilities of interaction term Hi Giuseppina, One suggestion that I have would be to use the -subpop()- option of the -svy:- prefix. This is something that surfaces on the Statalist regularly, although it may not be an issue in your specific case. Either way, the help file for -svy- includes the following line: "Warning: Using if or in restrictions will often not produce correct variance estimates for subpopulations. To compute estimates for subpopulations, use the subpop() option." With regards to your other question, I would look at -help mlogit postestimation- to get an idea of what is already available in Stata to calculate the predicted probabilities of the outcome after a multinomial logit model. HTH, Billy -----Original Message----- From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Valle, Giuseppina Sent: Tuesday, July 17, 2012 1:38 PM To: statalist@hsphsun2.harvard.edu Subject: st: predicted probabilities of interaction term Hello, I was wondering how to run predicted probabilities for a multinomial regression with an interaction term. Here is the syntax I am using: svy: mlogit timing pledge sexed i.race i.relig i.race#i.relig /// wave4age stepfam singlemo singleda other HSdeg somecoll /// colldeg misseduc lowmidinc highmidinc highinc missinc /// midwest south northeast if gender==0, /// rrr baseoutcome(2) nolog I would appreciate any suggestions. Thanks! Giuseppina Valle * * 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/ * * 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/
------------------------------------------- Richard Williams, Notre Dame Dept of Sociology OFFICE: (574)631-6668, (574)631-6463 HOME: (574)289-5227 EMAIL: Richard.A.Williams.5@ND.Edu WWW: http://www.nd.edu/~rwilliam * * 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/