Learn R Programming

echoice2 (version 0.2.3)

vd_thin_draw: Thin 'echoice2'-vd draw objects

Description

Thin 'echoice2'-vd draw objects

Usage

vd_thin_draw(est, burnin_perc = 0.5, total_draws = NULL)

Value

thinned 'echoice2' draw object (list)

Arguments

est

is an 'echoice2' draw object (list)

burnin_perc

how much burn-in to remove

total_draws

how many draws to keep after thinning

Examples

Run this code
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=50, keep = 1)
#without thinning, yields R=50 draWs
dim(icecream_est$MUDraw)
icecream_est_thinned <- vd_thin_draw(icecream_est,.5)
#26 draws left after thinning about half
dim(icecream_est_thinned$MUDraw)

Run the code above in your browser using DataLab