ec_gen_err_ev1 {echoice2} | R Documentation |
Simulate error realization from EV1 distribution
Description
Simulate error realization from EV1 distribution
Usage
ec_gen_err_ev1(ec_dem, draws, seed = NULL)
Arguments
ec_dem |
discrete or volumetric choice data, with or without x |
draws |
draws from volumetric demand model |
seed |
seed for reproducible error realisations; seet is automatically reset of running this function |
Value
error realizations
Examples
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, cores=2)
#generate error realizations
errs<- ec_gen_err_ev1(icecream %>% dplyr::filter(id<100), icecream_est, seed=123)
[Package echoice2 version 0.2.4 Index]