if (require("mlogit")) {
data("Fishing", package = "mlogit")
Fish <- mlogit.data(Fishing, varying = c(2:9), shape = "wide", choice = "mode")
model <- mlogit(mode ~ price + catch, data = Fish)
r2_mcfadden(model)
}
Run the code above in your browser using DataLab