Hi,
I am new to R. I find that I can get the odds ratio of a logit regression
by typing exp(coef(result)) . However for a nested logit model with an
inclusive value parameter, I am not sure how to get the odds ratio.
My code is below, with m1 containing my results. Please help me to get the
odds-ratios from the coefficients.
library(mlogit)
# choice_t is my variable that takes a value 0 ,1 or 2. Here 0 is the only
branch for option A and 1 and 2 are sub-branches of option B.
mdat1 <- subset(dat1, select = c("mode?,?x1?,?x2?, ?x3?,?x4?, ?id"))
# This creates 2 other alternatives as per the requirement of Nested Logit
model. There should be a set of variables for all the options 0, 1, and 2.
File ndat1 has therefore 3*11304 = 33912 firm- year observations.
Mode variable =1 for the choice that the firm makes in that year. So if the
firm has made a choice of 2 in an year it will take the value 1 for only
that firm-year observation.