Description Usage Arguments Value Note
View source: R/poststratificationFunctions.R
Generate poststratified estimates
1 | poststratify(pred, PSFrame)
|
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 |
A dataframe containing the unit IDs and poststratified estimates
PSFrame must have 'unit' variable denoting the unit ID, and 'freq' variable denoting the frequency within each cell
length(pred) must equal nrow(PSFrame)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.