calibVars | R Documentation |
Construct a matrix of binary variables for calibration of sample weights according to known marginal population totals. The following methods are implemented:
calibVars.default(x)
calibVars.matrix(x)
calibVars.matrix(x)
calibVars.data.frame(x)
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.
Bernhard Meindl and Andreas Alfons
M. Templ, B. Meindl, A. Kowarik, A. Alfons, O. Dupriez (2017) Simulation of Synthetic Populations for Survey Data Considering Auxiliary Information. Journal of Statistical Survey, 79 (10), 1–38. doi: 10.18637/jss.v079.i10
calibSample
data(eusilcS)
# default method
## Not run:
aux <- calibVars(eusilcS$rb090)
head(aux)
# data.frame method
aux <- calibVars(eusilcS[, c("db040", "rb090")])
head(aux)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.