Learn R Programming

echoice2 (version 0.2.4)

dd_dem: Discrete Choice Predictions (HMNL)

Description

Discrete Choice Predictions (HMNL)

Usage

dd_dem(dd, est, prob = FALSE, cores = NULL)

Value

Draws of expected choice

Arguments

dd

tibble with long-format choice data

est

estimation object

prob

logical, report probabilities instead of demand

cores

cores

See Also

dd_est_hmnl() to generate demand predictions based on this model

Examples

Run this code
# \donttest{
data(icecream_discrete)
icecream_est <- icecream_discrete %>% filter(id<10) %>% dd_est_hmnl(R=4, cores=2)
#demand prediction
icecream_dempred <- icecream_discrete %>% filter(id<10) %>% 
  dd_dem(icecream_est, cores=2)
# }

Run the code above in your browser using DataLab