Do post-stratification and summarize draws in one step

poststrat_onestep(
  fit,
  poststrat_tgt,
  orig_data = NULL,
  area_var = "cd",
  count_var = "count",
  ...
)

Arguments

fit

A brms object from fit_brms.

poststrat_tgt

The poststratification target. It must contain the column count, which is treated as the number of trials in the binomial model.

orig_data

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.

area_var

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"

count_var

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

Details

A simple wrapper around poststrat_draws and summ_sims.