vd_dem_summarise {echoice2} | R Documentation |
Summarize posterior draws of demand (volumetric models only)
Description
Adds summaries of posterior draws of demand to tibble. (using the new demand draw format)
Usage
vd_dem_summarise(de, quantiles = c(0.05, 0.95))
vd_dem_summarize(de, quantiles = c(0.05, 0.95))
Arguments
de |
demand draws |
quantiles |
Quantiles for Credibility Intervals (default: 90% interval) |
Value
Summary of demand predictions
Examples
data(icecream)
#run MCMC sampler (use way more than 10 draws for actual use)
icecream_est <- icecream %>% dplyr::filter(id<10) %>% vd_est_vdm(R=10, keep=1, cores=2)
#Generate demand predictions
icecream_predicted_demand=
icecream %>% dplyr::filter(id<10) %>%
vd_dem_vdm(icecream_est)
#aggregate
brand_lvl_pred_demand <-
icecream_predicted_demand %>% ec_dem_aggregate("Brand")
#summarise
brand_lvl_pred_demand %>% vd_dem_summarise()
[Package echoice2 version 0.2.4 Index]