generate_default_availabilities: Generate a ones-matrix of availabilities

Description Usage Arguments Value Examples

View source: R/helper_functions.R

Description

Generate a ones-matrix of availabilities

Usage

1
generate_default_availabilities(data, num_utility_functions)

Arguments

data

The dataset used in the model

num_utility_functions

the number of alternatives in the model

Value

Ones-matrix of availabilities for alternatives and the number of choice observations

Examples

1
2
3
4
data("Train", package="mlogit")
Train$ID <- Train$id
Train$CHOICE <- as.numeric(Train$choice)
generate_default_availabilities(Train, 5)

mixl documentation built on Oct. 23, 2020, 7:28 p.m.