Learn R Programming

laeken (version 0.3.2)

variance: Variance and confidence intervals of indicators on social exclusion and poverty

Description

Compute variance and confidence interval estimates of indicators on social exclusion and poverty.

Usage

variance(inc, weights = NULL, years = NULL, breakdown = NULL, 
         design = NULL, data = NULL, indicator, alpha = 0.05, 
         na.rm = FALSE, type = "bootstrap", gender = NULL, method = "mean", ...)

Arguments

inc
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
breakdown
optional; either a numeric vector giving different strata, or (if data is not NULL) a character string, an integer or a logical vector specifying the corresponding column of data. If supplied, the val
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
data
an optional data.frame.
indicator
an object inheriting from the class "indicator" that contains the point estimates of the indicator (see arpr, qsr,
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
mean or median. If weights are provided, the weighted mean or weighted median is estimated.
...
additional arguments to be passed to bootVar.

Value

  • An object of the same class as indicator is returned. See arpr, qsr, rmpg or gini for details on the components.

Details

This is a wrapper function for computing variance and confidence interval estimates of indicators on social exclusion and poverty.

See Also

bootVar, arpr, qsr, rmpg, gini

Examples

Run this code
data(eusilc)
a <- arpr("eqIncome", weights = "rb050", data = eusilc)

## naive bootstrap
variance("eqIncome", weights = "rb050", design = "db040", 
    data = eusilc, indicator = a, bootType = "naive", seed = 123)

## bootstrap with calibration
variance("eqIncome", weights = "rb050", design = "db040", 
    data = eusilc, indicator = a, X = calibVars(eusilc$db040), 
    seed = 123)

Run the code above in your browser using DataLab