Description Usage Arguments Value See Also Examples
View source: R/mrp_estimation.R
This function calls mrp_party_estimation using all the parties
specified in '...', once there is an estimation of the number of votes for
each party/candidate it computes the proportion of votes for each one.
| 1 2 3 | 
| data | A  | 
| ... | One or more unquoted expressions separated by commas, indicating the column names with the votes for each candidate. | 
| 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. | 
| frac | If sampling the data, numeric value indicating the fraction of the data to sample, the sample is selected using stratified sampling with probability proportional to size. | 
| n_iter | Number of iterations, burnin size and chains.
to be used in  | 
| n_burnin | Number of iterations, burnin size and chains.
to be used in  | 
| 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. | 
| parallel | Logical value indicating whether to parallelize the models, if TRUE package parallel must be installed (uses mclapply and can not be used in Windows). | 
| n_cores | If parallelizing, the number of cores to use, parameter is
used in  | 
| 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. | 
A list with the object fitted using R2jags::jags and a
data.frame with the estimation summary (posterior means, medians, standard
deviations and probability intervals per party).
| 1 2 3 4 | data("gto_2012")
est_gto <- mrp_estimation(gto_2012, party = pri_pvem:otros, stratum = distrito_loc_17,
  frac = 0.01, seed = 2212)
est_gto$post_summary
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.