Get summary statistics from draws (of counts)
summ_sims(sims, area_var = "cd", est_var = "p_mrp", dtplyr = TRUE)
output of poststrat_draws
A character string for the variable name(s) for area to group
and aggregate by. That is, the area of interest in MRP. Defaults to "cd"
column name with estimates. Following the output of
poststrat_draws, defaults to p_mrp
.
Whether to use a data.table/dtplyr backend for processing for slightly faster dataframe wrangling. Currently does not apply to anything within the function.
if (FALSE) {
drw_GA <- poststrat_draws(fit_GA, poststrat_tgt = acs_GA)
summ_sims(drw_GA, area_bar = "cd") # also saved as data(`summ_GA`)
# To create summaries by both CD and education
drw_GA_educ <- poststrat_draws(fit_GA, poststrat_tgt = acs_GA, area_var = c("cd", "educ"))
summ_sims(drw_GA_educ, area_var = c("cd", "educ"))
}