epoststrat: Wrap function for post-stratification weights

epoststratR Documentation

Wrap function for post-stratification weights

Description

This is a wrap function to compute post-stratification weights based on simple sample design (probability sampling)

Usage

epoststrat(data, pop.prop, strata)

Arguments

data

a data frame with the data. The name of the (post) stratification variables and their categories must match the data provided in pop.prop.

pop.prop

a data frame with the population frequencies. Each column must be a (post) stratification variable. It must include a column Freq with the percentage of the population in each strata. The name of the stratification variables and their categories must match those provided in the data

strata

a formula with the name of the variables for stratification. See postStratify for details

Value

It returns a list with two elements. The first element is the weight, the second is the trimmed weights. See trimWeights for details


DiogoFerrari/edar documentation built on May 8, 2022, 8:26 a.m.