View source: R/draw-from-posterior.R
draw_from_posterior | R Documentation |
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.
as_survey
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.