Discrete Choice Predictions (HMNL)
dd_dem(dd, est, prob = FALSE, cores = NULL)
tibble with long-format choice data
estimation object
logical, report probabilities instead of demand
cores
Draws of expected choice
dd_est_hmnl()
to generate demand predictions based on this model
data(icecream_discrete)
icecream_est <- icecream_discrete %>% filter(id<20) %>% dd_est_hmnl(R=10)
#> Using 16 cores
#> MCMC in progress
#> MCMC complete
#> Total Time Elapsed: 0.00 minutes
#demand prediction
icecream_dempred <- icecream_discrete %>% filter(id<20) %>%
dd_dem(icecream_est, cores=2)
#> Using 2 cores