View source: R/helper_functions.R
generate_default_availabilities | R Documentation |
Generate a ones-matrix of availabilities
generate_default_availabilities(data, num_utility_functions)
data |
The dataset used in the model |
num_utility_functions |
the number of alternatives in the model |
Ones-matrix of availabilities for alternatives and the number of choice observations
data("Train", package="mlogit")
Train$ID <- Train$id
Train$CHOICE <- as.numeric(Train$choice)
generate_default_availabilities(Train, 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.