bootVar  R Documentation 
Compute variance and confidence interval estimates of indicators on social exclusion and poverty based on bootstrap resampling.
bootVar(
inc,
weights = NULL,
years = NULL,
breakdown = NULL,
design = NULL,
cluster = NULL,
data = NULL,
indicator,
R = 100,
bootType = c("calibrate", "naive"),
X,
totals = NULL,
ciType = c("perc", "norm", "basic"),
alpha = 0.05,
seed = NULL,
na.rm = FALSE,
gender = NULL,
method = NULL,
...
)
inc 
either a numeric vector giving the equivalized disposable income,
or (if 
weights 
optional; either a numeric vector giving the personal sample
weights, or (if 
years 
optional; either a numeric vector giving the different years of
the survey, or (if 
breakdown 
optional; either a numeric vector giving different domains,
or (if 
design 
optional; either an integer vector or factor giving different
strata for stratified sampling designs, or (if 
cluster 
optional; either an integer vector or factor giving different
clusters for cluster sampling designs, or (if 
data 
an optional 
indicator 
an object inheriting from the class 
R 
a numeric value giving the number of bootstrap replicates. 
bootType 
a character string specifying the type of bootstap to be
performed. Possible values are 
X 
if 
totals 
numeric; if 
ciType 
a character string specifying the type of confidence
interval(s) to be computed. Possible values are 
alpha 
a numeric value giving the significance level to be used for
computing the confidence interval(s) (i.e., the confidence level is 
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. 
na.rm 
a logical indicating whether missing values should be removed. 
gender 
either a numeric vector giving the gender, or (if 
method 
a character string specifying the method to be used (only for

... 
if 
An object of the same class as indicator
is returned. See
arpr
, qsr
, rmpg
or
gini
for details on the components.
This function gives reasonable variance estimates for basic sample designs such as simple random sampling or stratified simple random sampling.
Andreas Alfons
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. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.18637/jss.v054.i15")}
variance
, calibWeights
,
arpr
, qsr
, rmpg
, gini
data(eusilc)
a < arpr("eqIncome", weights = "rb050", data = eusilc)
## naive bootstrap
bootVar("eqIncome", weights = "rb050", design = "db040",
data = eusilc, indicator = a, R = 50,
bootType = "naive", seed = 123)
## bootstrap with calibration
bootVar("eqIncome", weights = "rb050", design = "db040",
data = eusilc, indicator = a, R = 50,
X = calibVars(eusilc$db040), seed = 123)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.