generate_default_availabilities: Generate a ones-matrix of availabilities

View source: R/helper_functions.R

generate_default_availabilitiesR Documentation

Generate a ones-matrix of availabilities

Description

Generate a ones-matrix of availabilities

Usage

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

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

mixl documentation built on May 29, 2024, 1:31 a.m.