Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

calibVars

Construct a matrix of binary variables for calibration


Description

Construct a matrix of binary variables for calibration of sample weights according to known marginal population totals.

Usage

calibVars(x)

Arguments

x

a vector that can be interpreted as factor, or a matrix or data.frame consisting of such variables.

Value

A matrix of binary variables that indicate membership to the corresponding factor levels.

Author(s)

Andreas Alfons

See Also

Examples

data(eusilc)
# default method
aux <- calibVars(eusilc$rb090)
head(aux)
# data.frame method
aux <- calibVars(eusilc[, c("db040", "rb090")])
head(aux)

laeken

Estimation of Indicators on Social Exclusion and Poverty

v0.5.1
GPL (>= 2)
Authors
Andreas Alfons [aut, cre], Josef Holzer [aut], Matthias Templ [aut], Alexander Haider [ctb]
Initial release
2020-02-05

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.