Learn R Programming

echoice2 (version 0.2.4)

ec_screen_summarise: Summarize posterior draws of screening

Description

Adds summaries of posterior draws of demand to tibble. (using the new demand draw format)

Usage

ec_screen_summarise(sc, quantiles = c(0.05, 0.95))

ec_screen_summarize(sc, quantiles = c(0.05, 0.95))

Value

Summary of screening probabilities

Arguments

sc

tibble containing screening draws in .screendraws

quantiles

Quantiles for Credibility Intervals (default: 90% interval)

Examples

Run this code
# \donttest{
data(icecream)
icecream_est <- icecream %>% vd_est_vdm_screen(R=20,  price_screen=TRUE, cores=2)
#consideration set by respondent
cons_ss <- 
ec_screenprob_sr(icecream, icecream_est, cores=2) %>%
group_by(id, task)  %>%
  summarise(.screendraws=list(purrr::reduce(.screendraws ,`+`))) %>%
  ec_screen_summarise() %>%
  group_by(id) %>%
  summarise(n_screen=mean(`E(screening)`))
  # }

Run the code above in your browser using DataLab