我不能在这里得到错误,你能帮帮我吗?
mdata <- mlogit.data(data=data,
choice='MODE', # variable that contains choice
shape='long', # tells mlogit how data is structured (every row is alternative)
varying=3:5, # only select variables that describe the alternatives
alt.levels = c("plane", "train", "bus", "car"), # levels of the alternatives
id.var='TRAVELER') # consumer id
head(mdata,6)
我收到此错误:
猜测错误(变化):无法从名称中猜测随时间变化的变量
这就是我的数据集的样子:
谢谢!