Formats a post-strat table from ACS and district-level data

get_poststrat(cleaned_acs, dist_data = NULL, formula)

## Arguments

cleaned_acs An output of get_acs_cces. The count of people in each cell must be under the variable count District-level (in this case congressional district-level) information to merge in the model formula used to fit the multilevel regression model, with one term on the LHS: e.g. y ~ x1 + x2 + (1|x3). Only the RHS will be used but the LHS is necessary for now.

## Examples

if (FALSE) {
fm_brm <- response ~  age + gender + educ + pct_trump + (1|cd)
acs_tab <- get_acs_cces(
varlist = acscodes_age_sex_educ,
varlab_df = acscodes_df,
year = 2018)

poststrat <-  get_poststrat(acs_tab, cd_info_2018, fm_brm)