calibVars | R Documentation |
Construct a matrix of binary variables for calibration of sample weights according to known marginal population totals.
calibVars(x)
x |
a vector that can be interpreted as factor, or a matrix or
|
A matrix of binary variables that indicate membership to the corresponding factor levels.
Andreas Alfons
calibWeights
data(eusilc)
# default method
aux <- calibVars(eusilc$rb090)
head(aux)
# data.frame method
aux <- calibVars(eusilc[, c("db040", "rb090")])
head(aux)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.