[R] Changes in Predicted Probabilities for multinomial regression as in STATA software

eugen pircalabelu eugen_pircalabelu at yahoo.com
Mon Nov 30 14:19:52 CET 2009


Hi R-users,

I can not replicate the result for marginal effects from multinomial logistic regression stata output below  (http://www.ats.ucla.edu/stat/stata/Library/longutil.htm) The dataset can be found here http://www.ats.ucla.edu/stat/stata/webbooks/logistic/hsblog.dta

PART OF STATA OUTPUT

mlogit: Changes in Predicted Probabilities for prog
female

            Avg|Chg|     general    vocation    academic
    0->1   .02790104  -.02005389  -.02179766   .04185158

read
            Avg|Chg|     general    vocation    academic
MargEfct    .0217727   -.0033582  -.00752815   .01088635

math
            Avg|Chg|     general    vocation    academic
MargEfct   .04519518  -.00711382  -.01548377   .02259759


library(foreign)
library(nnet)
library(VGAM)
hs.data<-read.dta("E:\\hsblog.dta")
head(hs.data)
hs.data$prog<-relevel(hs.data$prog, ref="academic")
mlt.fit<-multinom(prog ~ female+read+math, data = hs.data)
mlt.fit
hs.data$prog<-relevel(hs.data$prog, ref="general")
hs.data$prog<-relevel(hs.data$prog, ref="vocation")
vglm.fit<-vglm(prog ~ female+read+math,multinomial, data = hs.data)
summary(vglm.fit)

So both functions from R provide the same result as on the site.

As I see that the "marginal effects part/Changes in Predicted Probabilities" is not standard output in the 2 functions, can anyone please, tell me how i can get those marginal effects?


PS: I read also http://socserv.mcmaster.ca/jfox/Misc/polytomous-effect-displays/polytomous-effect-displays.pdf  but could not obtain the changes in predicted probabilities. 
Can anyone give me a hint on how to obtain them?

Thank you very much and have a great day ahead!


Eugen Pircalabelu
(0032)471 842 140
(0040)727 839 293




More information about the R-help mailing list