Do post-stratification and summarize draws in one step
poststrat_onestep(
fit,
poststrat_tgt,
orig_data = NULL,
area_var = "cd",
count_var = "count",
...
)
A brms object from fit_brms
.
The poststratification target. It must contain the column
count
, which is treated as the number of trials
in the binomial model.
original survey data. This defaults to NULL but if supplied be used to (1) subset the poststratification, to areas only in the survey, and (2) label the question outcome.
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"
A character string for the variable name for the population
count in the poststrat_tgt
dataframe. This will be renamed as if it is
a trial count in the model. Defaults to "count"
.
Additional arguments to poststrat_draws
A simple wrapper around poststrat_draws
and summ_sims
.