On the right says:
The data argument may be the usual "data.frame". In this case, some additional arguments should be provided and "Mlogit.data.
. , , , .
, "" "" :
# a data.frame in wide format with two missing prices
Fishing2 <- Fishing
Fishing2[1, "price.pier"] <- Fishing2[3, "price.beach"] <- NA
mlogit(mode~price+catch|income, Fishing2, shape="wide", choice="mode", varying = 2:9)
# a data.frame in long format with three missing lines
data("TravelMode", package = "AER")
Tr2 <- TravelMode[-c(2, 7, 9),]
mlogit(choice~wait+gcost|income+size, Tr2, shape = "long",
chid.var = "individual", alt.var="mode", choice = "choice")
, stackoverflow! .
- , . , mlogit, mlogit .
- .
head, , . library(mlogit) . - . , . , ,
some supplementary arguments should be provided . , mlogit, ?mlogit help(mlogit).