# NOT RUN {
# feel free to ignore the following line<U+2014>it allows {broom} to supply
# examples without requiring the model-supplying package to be installed.
if (requireNamespace("mlogit", quietly = TRUE)) {
# load libraries for models and data
library(mlogit)
data("Fishing", package = "mlogit")
Fish <- dfidx(Fishing, varying = 2:9, shape = "wide", choice = "mode")
# fit model
m <- mlogit(mode ~ price + catch | income, data = Fish)
# summarize model fit with tidiers
tidy(m)
augment(m)
glance(m)
}
# }
Run the code above in your browser using DataLab