combine_P_matrices: Make the P matrix (election probability matrix)

View source: R/combine_P_matrices.R

combine_P_matricesR Documentation

Make the P matrix (election probability matrix)

Usage

combine_P_matrices(election_event_probs)

Arguments

election_event_probs

The output of election_event_probs() or a standalone Monte Carlo function; a list of election events, each of which is a list with a probability (integral) and an event-specific P matrix (P).

Examples

plurality_election(k = 3) %>%
   election_event_probs(method = "sc", alpha = c(10, 8, 5)) %>%
   combine_P_matrices -> P
t(P) %*%  c(2, 5, 9)

aeggers/pivotprobs documentation built on Oct. 28, 2024, 9:46 a.m.