mlogit.data fails for latest version of mlogit package

#1

Hi

I cannot run the official R examples for mlogit as I get this error about not being able to find mlogit.data

I checked and I have the latest version mlogit v0.4-1 and mlogit.data is part of that package. So why doesnt it work plz?

data("TravelMode", package = "AER")
TM <- mlogit.data(TravelMode, choice = "choice", shape = "long",
alt.levels = c("air", "train", "bus", "car"))

Error in mlogit.data(TravelMode, choice = "choice", shape = "long", alt.levels = c("air", : could not find function "mlogit.data"
Traceback:

0 Likes

#2

Have you loaded mlogit package before using the function?

library(mlogit)
data("TravelMode", package = "AER")
TM <- mlogit.data(TravelMode, choice = "choice", shape = "long", alt.levels = c("air", "train", "bus", "car"))
0 Likes

closed #3

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.

0 Likes