sample_predictive: Draw ballots from the posterior predictive distribution.

View source: R/dtree.R

sample_predictiveR Documentation

Draw ballots from the posterior predictive distribution.

Description

sample_predictive draws ballots from a multinomial distribution with probabilities obtained from a single realization of the Dirichlet-tree posterior on the ranked ballots. See \insertCitedtree_evoteid;textualelections.dtree for details.

Usage

sample_predictive(dtree, n_ballots)

Arguments

dtree

A dirichlet_tree object.

n_ballots

An integer representing the number of ballots to draw.

Value

A prefio::preferences object containing n_ballots ballots drawn from a single realisation of the posterior Dirichlet-tree.

References

\insertRef

dtree_eiselections.dtree.

\insertRef

dtree_evoteidelections.dtree.


elections.dtree documentation built on Sept. 16, 2023, 5:06 p.m.