Calculates predicted values from a multilevel regression and the post-stratified state-level estimates
post_stratification_helper(model_fit, data, group, weights)
data.frame of post-stratified group-level estimates
a model fit object from, e.g., glmer or lm_robust
a data.frame
unquoted name of the group variable to construct estimates for
unquoted name of post-stratification weights variable
Please see https://book.declaredesign.org/observational-descriptive.html#multi-level-regression-and-poststratification