View source: R/hb_estimation.R
hb_estimation_parallel | R Documentation |
Compute point estimate and credible intervals for each candidate, parallized over split_var.
hb_estimation_parallel(
data_tbl,
sampling_frame,
split_var = NULL,
nominal_list_var = NULL,
num_cores = 5,
inv_metric_list = NULL,
nominal_max = 1000,
sig_figs = 7,
...
)
data_tbl |
|
sampling_frame |
|
split_var |
unquoted name of variable that splits sampling frame and data |
nominal_list_var |
Unquoted name of variable with nominal list of voters |
num_cores |
Number of cores to use for parallel computation |
inv_metric_list |
List of inv_metric diagonals guesses for each split |
nominal_max |
Maximum number of nominal count for stations. Used for stations without fixed nominal list. |
sig_figs |
Number of significant figures for Stan output |
... |
Other parameters passed to hb_estimation. |
Posterior simulations of parameters are computed using stan, and each party's votes are simulated for every polling station (logit model) or with a softmax link for the default (mlogit model). There is one independent model for each party, and proportions are calculated from posterior simulations of total votes. Splits are modelled independently
A list with model fit (if return_fit=TRUE), a tibble
estimates including point estimates for each party (median)
and limits of credible intervals, and a vector inv_metric for the model
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.