R/draw-from-posterior.R
draw_from_posterior.Rd
Draw random numbers from posterior distribution
draw_from_posterior( survey, nsim = 10000, seed = as.numeric(now()), prior = NULL, correction = NULL )
survey | survey object as returned by |
---|---|
nsim | number of simulations |
seed | sets seed |
prior | optional prior information. Defaults to 1/2 (Jeffrey's prior). |
correction | A positive number. If not |
data.frame
containing random draws from Dirichlet distribution
which can be interpreted as election results.