simStructure | R Documentation |
Simulate basic categorical variables that define the household structure (typically variables such as household ID, age and gender) of population data by resampling from survey data.
simStructure(
dataS,
method = c("direct", "multinom", "distribution"),
basicHHvars,
seed = 1,
MaxNWts = 1e+07
)
dataS |
an object of class |
method |
a character string specifying the method to be used for
simulating the household sizes. Accepted values are |
basicHHvars |
a character vector specifying important variables for the
household structure that need to be available in |
seed |
optional; an integer value to be used as the seed of the random number generator, or an integer vector containing the state of the random number generator to be restored. |
MaxNWts |
optional; an integer value for the multinom method for controlling the maximum number of weights. |
An object of class simPopObj
containing the simulated
population household structure as well as the underlying sample that was
provided as input.
The function sample
is used, which gives results
incompatible with those from < 2.2.0 and produces a warning the first time
this happens in a session.
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. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.18637/jss.v079.i10")}
simCategorical
, simContinuous
,
simComponents
, simEUSILC
data(eusilcS)
## Not run:
inp <- specifyInput(data=eusilcS, hhid="db030", hhsize="hsize", strata="db040", weight="db090")
eusilcP <- simStructure(data=inp, method="direct", basicHHvars=c("age", "rb090"))
class(eusilcP)
eusilcP
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.