sample_posterior | R Documentation |
sample_posterior
draws sets of ballots from independent realizations
of the Dirichlet-tree posterior, then determines the probability for each
candidate being elected by aggregating the results of the social choice
function. See \insertCitedtree_evoteid;textualelections.dtree for
details.
sample_posterior(
dtree,
n_elections,
n_ballots,
n_winners = 1,
replace = FALSE,
n_threads = NULL
)
dtree |
A |
n_elections |
An integer representing the number of elections to generate. A higher number yields higher precision in the output probabilities. |
n_ballots |
An integer representing the total number of ballots cast in the election. |
n_winners |
The number of candidates elected in each election. |
replace |
A boolean indicating whether or not we should re-use the observed ballots in the monte-carlo integration step to determine the posterior probabilities. |
n_threads |
The maximum number of threads for the process. The default value of
|
A numeric vector containing the probabilities for each candidate being elected.
dtree_eiselections.dtree.
\insertRefdtree_evoteidelections.dtree.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.