View source: R/mrp_estimation_stan.R
The function fits a model using the rstan
package and
predicts proportional of votes for all candidates candidate in unobserved polling
stations. Optionally the model can be fit with a stratified random sample
1 2 3 4 |
data |
A |
stratum |
If sampling the data, unquoted variable indicating the column from the data.frame to be used as strata. The strata will also be used in the hierarchical structure of the model. |
n_iter |
Number of iterations, burnin size and chains.
to be used in |
n_warmup |
burnin size |
n_chains |
Number of iterations, burnin size and chains.
to be used in |
seed |
Integer value used to set the state of the random number generator. |
model_string |
String indicating the model to be used, if NULL defaults
to |
set_strata_na |
Option to exclude strata when fitting the model, used for model evaluation and calibration. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.