powered by
Generate a ones-matrix of availabilities
generate_default_availabilities(data, num_utility_functions)
Ones-matrix of availabilities for alternatives and the number of choice observations
The dataset used in the model
the number of alternatives in the model
data("Train", package="mlogit") Train$ID <- Train$id Train$CHOICE <- as.numeric(Train$choice) generate_default_availabilities(Train, 5)
Run the code above in your browser using DataLab