Skip to contents

Delegates to survey::postStratify() when given a design; otherwise computes raw post-stratification factors in base R.

Usage

morie_survey_poststratify(df, strata_col, population_counts)

Arguments

df

A data.frame holding the (unit-level) sample data plus any weight/strata/cluster/domain columns referenced by name.

strata_col

Character; column name of the stratum identifier in df.

population_counts

Named numeric vector of population counts by stratum (post-stratification target).