[R] mlogit and model-based recursive partitioning
tudor_bodea at hotmail.com
Mon Oct 1 23:53:28 CEST 2012
Has anyone tried to model-based recursive partition (using mob from package
party; thanks Achim and colleagues) a data set based on a multinomial logit
model (using mlogit from package mlogit; thanks Yves)?
I attempted to do so, but there are at least two reasons why I could not.
First, in mob I am not quite sure that a model of class StatModel exists for
mlogit models. Second, as mlogit uses the pipe character | to specify the
model, I wonder how this would interact with mob which uses pipe to
differentiate between explanatory and segmentation variables.
An example (not working) of what I would like to accomplish follows below.
Thanks a lot.
data("Fishing", package = "mlogit")
Fish <- mlogit.data(Fishing, varying = c(2:9), shape = "wide", choice =
# FIT AN mlogit MODEL
m1 <- mlogit(mode ~ price + catch, data=Fish)
# THE DESIRED END RESULT: SEGMENT m1 BASED ON INCOME AND/OR OTHER POSSIBLE
View this message in context: http://r.789695.n4.nabble.com/mlogit-and-model-based-recursive-partitioning-tp4644743.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help