poststratify: Generate poststratified estimates

Description Usage Arguments Value Note

View source: R/poststratificationFunctions.R

Description

Generate poststratified estimates

Usage

1
poststratify(pred, PSFrame)

Arguments

pred

A vector of predicted values for each row in PSFrame

PSFrame

A dataframe containing the empirical frequency of each unique demographic group within a subnational unit

Value

A dataframe containing the unit IDs and poststratified estimates

Note

PSFrame must have 'unit' variable denoting the unit ID, and 'freq' variable denoting the frequency within each cell

length(pred) must equal nrow(PSFrame)


joeornstein/SRP documentation built on Oct. 15, 2020, 8:30 p.m.