ec_gen_err_normal {echoice2} | R Documentation |
Simulate error realization from Normal distribution
Description
Simulate error realization from Normal distribution
Usage
ec_gen_err_normal(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<10) %>%
vd_est_vdm(R=10, keep=1, error_dist = "Normal", cores=2)
#generate error realizations
errs<- ec_gen_err_normal(icecream %>% dplyr::filter(id<10), icecream_est, seed=123)
[Package echoice2 version 0.2.4 Index]