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, seed)data.frame containing EU-SILC survey data.dataS that
contains the household ID.dataS that
contains the household sample weights.dataS that
contains the personal sample weights.dataS that contains the household size. If NULL, the household
sizes are computed.dataS that
define strata. Note that this is currently a required argument and only one
stratification variable is supported.dataS
that contains the personal ID.dataS that
contains the age of the persons (to be used for setting up the household
structure).dataS that
contains the gender of the persons (to be used for setting up the household
structure).categorizeAge is TRUE, an
optional vector of two or more break points for constructing age categories,
otherwise ignored.dataS that should be simulated for the population data.dataS
that contains the personal income (to be simulated for the population data)."multinom" (for using
multinomial log-linear models combined with random draws from the resulting
ategories) and "twostep" (for using two-step regression models
combined with random error terms).method is "multinom", an optional numeric
vector of two or more break points for categorizing the personal income. If
missing, break points are computed using weighted quantiles.method is "multinom" and
breaks is NULL, these can be used to specify lower and upper
bounds other than minimum and maximum, respectively. Note that if gpd
is TRUE (see below), upper defaults to Inf.method is "multinom" and
breaks is NULL, this indicates whether the (positive) default
break points should be equidistant or whether there should be refinements in
the lower and upper tail (see getBreaks).method is
"multinom" and breaks is NULL, this gives probabilities
for quantiles to be used as (positive) break points. If supplied, this is
preferred over equidist.method is "multinom", this indicates
whether the upper tail of the personal income should be simulated by random
draws from a (truncated) generalized Pareto distribution rather than a
uniform distribution.method is "multinom",
values for categories above threshold are drawn from a (truncated)
generalized Pareto distribution.method is "multinom", the
estimator to be used to fit the generalized Pareto distribution.method is "twostep", this gives a
constant to be added before log transformation.method is "twostep", this gives
trimming parameters for the sample data. Trimming is thereby done with
respect to the variable specified by additional. If a numeric vector
of length two is supplied, the first element gives the trimming proportion
for the lower part and the second element the trimming proportion for the
upper part. If a single numeric is supplied, it is used for both. With
NULL, trimming is suppressed.method is "twostep", this
indicates whether the random error terms should be obtained by draws from
the residuals. If FALSE, they are drawn from a normal distribution
(median and MAD of the residuals are used as parameters).dataS (to be simulated for the population data).dataS are then drawn from the respective
subsets defined by these variables.method is "twostep", a small positive numeric
value or NULL (see simContinuous).simPopObj containing the
simulated EU-SILC population data as well as the underlying sample.
simStructure, simCategorical,
simContinuous, simComponents
data(eusilcS) # load sample data
## Not run:
# ## long computation time
# # multinomial model with random draws
# eusilcM <- simEUSILC(eusilcS, upper = 200000, equidist = FALSE)
# summary(eusilcM)
#
# # two-step regression
# eusilcT <- simEUSILC(eusilcS, method = "twostep")
# summary(eusilcT)
# ## End(Not run)
Run the code above in your browser using DataLab