simEUSILC {simPop} | R Documentation |
Simulate EU-SILC population data
Description
Simulate population data for the European Statistics on Income and Living Conditions (EU-SILC).
Usage
simEUSILC(
dataS,
hid = "db030",
wh = "db090",
wp = "rb050",
hsize = NULL,
strata = "db040",
pid = NULL,
age = "age",
gender = "rb090",
categorizeAge = TRUE,
breaksAge = NULL,
categorical = c("pl030", "pb220a"),
income = "netIncome",
method = c("multinom", "twostep"),
breaks = NULL,
lower = NULL,
upper = NULL,
equidist = TRUE,
probs = NULL,
gpd = TRUE,
threshold = NULL,
est = "moments",
const = NULL,
alpha = 0.01,
residuals = TRUE,
components = c("py010n", "py050n", "py090n", "py100n", "py110n", "py120n", "py130n",
"py140n"),
conditional = c(getCatName(income), "pl030"),
keep = TRUE,
maxit = 500,
MaxNWts = 1500,
tol = .Machine$double.eps^0.5,
nr_cpus = NULL,
seed
)
Arguments
dataS |
a |
hid |
a character string specifying the column of |
wh |
a character string specifying the column of |
wp |
a character string specifying the column of |
hsize |
an optional character string specifying a column of
|
strata |
a character string specifying the column of |
pid |
an optional character string specifying a column of |
age |
a character string specifying the column of |
gender |
a character string specifying the column of |
categorizeAge |
a logical indicating whether age categories should be used for simulating additional categorical and continuous variables to decrease computation time. |
breaksAge |
numeric; if |
categorical |
a character vector specifying additional categorical
variables of |
income |
a character string specifying the variable of |
method |
a character string specifying the method to be used for
simulating personal income. Accepted values are |
breaks |
if |
lower , upper |
numeric values; if |
equidist |
logical; if |
probs |
numeric vector with values in |
gpd |
logical; if |
threshold |
a numeric value; if |
est |
a character string; if |
const |
numeric; if |
alpha |
numeric; if |
residuals |
logical; if |
components |
a character vector specifying the income components in
|
conditional |
an optional character vector specifying categorical
contitioning variables for resampling of the income components. The
fractions occurring in |
keep |
a logical indicating whether variables computed internally in the procedure (such as the original IDs of the corresponding households in the underlying sample, age categories or income categories) should be stored in the resulting population data. |
maxit , MaxNWts |
control parameters to be passed to
|
tol |
if |
nr_cpus |
if specified, an integer number defining the number of cpus that should be used for parallel processing. |
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. |
Value
An object of class simPopObj
containing the
simulated EU-SILC population data as well as the underlying sample.
Note
This is a wrapper calling simStructure
,
simCategorical
, simContinuous
and
simComponents
.
Author(s)
Andreas Alfons and Stefan Kraft and Bernhard Meindl
See Also
simStructure
, simCategorical
,
simContinuous
, simComponents
Examples
data(eusilcS) # load sample data
## Not run:
## long computation time
# multinomial model with random draws
eusilcM <- simEUSILC(eusilcS, upper = 200000, equidist = FALSE
, nr_cpus = 1)
summary(eusilcM)
# two-step regression
eusilcT <- simEUSILC(eusilcS, method = "twostep", nr_cpus = 1)
summary(eusilcT)
## End(Not run)