Simulate error realization from Normal distribution
ec_gen_err_normal(ec_dem, draws, seed = NULL)
discrete or volumetric choice data, with or without x
draws from volumetric demand model
seed for reproducible error realisations; seet is automatically reset of running this function
error realizations
data(icecream)
#run MCMC sampler (use way more than 50 draws for actual use)
icecream_est <- icecream %>% dplyr::filter(id<100) %>%
vd_est_vdm(R=100, keep=1, error_dist = "Normal")
#> Using 16 cores
#> MCMC in progress
#> MCMC complete
#> Total Time Elapsed: 0.00 minutes
#generate error realizations
errs<- ec_gen_err_normal(icecream %>% dplyr::filter(id<100), icecream_est, seed=123)