either a numeric vector giving the equivalized disposable income,
or (if data is not NULL) a character string, an integer or a
logical vector specifying the corresponding column of data.
weights
optional; either a numeric vector giving the personal sample
weights, or (if data is not NULL) a character string, an
integer or a logical vector specifying the corresponding column of
data.
years
optional; either a numeric vector giving the different years of
the survey, or (if data is not NULL) a character string, an
integer or a logical vector specifying the corresponding column of
data. If supplied, values are computed for each year.
breakdown
optional; either a numeric vector giving different domains,
or (if data is not NULL) a character string, an integer or a
logical vector specifying the corresponding column of data. If
supplied, the values for each domain are computed in addition to the overall
value.
design
optional; either an integer vector or factor giving different
strata for stratified sampling designs, or (if data is not
NULL) a character string, an integer or a logical vector specifying
the corresponding column of data.
cluster
optional; either an integer vector or factor giving different
clusters for cluster sampling designs, or (if data is not
NULL) a character string, an integer or a logical vector specifying
the corresponding column of data.
data
an optional data.frame.
indicator
an object inheriting from the class "indicator" that
contains the point estimates of the indicator (see arpr,
qsr, rmpg or gini).
alpha
a numeric value giving the significance level to be used for
computing the confidence interval(s) (i.e., the confidence level is 1 -
alpha), or NULL.
na.rm
a logical indicating whether missing values should be removed.
type
a character string specifying the type of variance estimation to
be used. Currently, only "bootstrap" is implemented for variance
estimation based on bootstrap resampling (see bootVar).
gender
either a numeric vector giving the gender, or (if data
is not NULL) a character string, an integer or a logical vector
specifying the corresponding column of data.
method
a character string specifying the method to be used (only for
gpg). Possible values are "mean" for the mean, and
"median" for the median. If weights are provided, the weighted mean
or weighted median is estimated.
...
additional arguments to be passed to bootVar.
Details
This is a wrapper function for computing variance and confidence interval
estimates of indicators on social exclusion and poverty.
Value
An object of the same class as indicator is returned. See
arpr, qsr, rmpg or
gini for details on the components.
Author(s)
Andreas Alfons
References
A. Alfons and M. Templ (2013) Estimation of Social Exclusion Indicators
from Complex Surveys: The R Package laeken. Journal of
Statistical Software, 54(15), 1–25. URL
http://www.jstatsoft.org/v54/i15/
See Also
bootVar, arpr, qsr,
rmpg, gini
Examples
data(eusilc)
a <- arpr("eqIncome", weights = "rb050", data = eusilc)
## naive bootstrap
variance("eqIncome", weights = "rb050", design = "db040",
data = eusilc, indicator = a, R = 50,
bootType = "naive", seed = 123)
## bootstrap with calibration
variance("eqIncome", weights = "rb050", design = "db040",
data = eusilc, indicator = a, R = 50,
X = calibVars(eusilc$db040), seed = 123)