Learn R Programming

vardpoor (version 0.2.0.8.1)

lingini2: Linearization of the GINI coefficient II

Description

Estimate the Gini coefficient, which is a measure for inequality, and its linerization.

Usage

lingini2(inc, id = NULL, weight = NULL, sort = NULL, Dom = NULL,
          period=NULL, dataset = NULL, na.rm = FALSE, var_name="lin_gini2")

Arguments

inc
either a numeric vector, 1 column data.frame, matrix, data.table giving the equivalized disposable income, or (if dataset is not NULL) a character string, an integer or a logical vector (length is the same as 'dataset
id
optional; either 1 column data.frame, matrix, data.table with column names giving the personal IDs, or (if dataset is not NULL) a character string, an integer or a logical vector (length is the same as 'dataset' colum
weight
optional; either a numeric vector, 1 column data.frame, matrix, data.table giving the personal sample weights, or (if dataset is not NULL) a character string, an integer or a logical vector (length is the same as 'dat
sort
optional; either a numeric vector, 1 column data.frame, matrix, data.table giving the personal IDs to be used as tie-breakers for sorting, or (if dataset is not NULL) a character string, an integer or a logical vector
Dom
optional; either a data.frame, matrix, data.table with column names giving different domains, or (if dataset is not NULL) character strings, integers or a logical vectors (length is the same as 'dataset' column count)
period
optional; either a data.frame, matrix, data.table with column names giving different periods, or (if dataset is not NULL) character strings, integers or a logical vectors (length is the same as 'dataset' column coun
dataset
an optional; name of the individual dataset data.frame.
na.rm
a logical indicating whether missing values should be removed.
var_name
a character string specifying the name of the linearized variable.

Value

  • The function returns two values:
  • valuea data.frame containing the estimate(s) the gini coeffients (in percentage) by domain, or (if Dom is NULL) totals, using Tille definition and Eurostat definition.
  • lina data.frame containing the values of linearized variables of the GINI coefficient (in precentage) by domains or (if Dom is NULL) totals.

References

Working group on Statistics on Income and Living Conditions (2004) Common cross-sectional EU indicators based on EU-SILC; the gender pay gap. EU-SILC 131-rev/04, Eurostat. MATTI LANGEL - YVES TILLE, Corrado Gini, a pioneer in balanced sampling and inequality theory. METRON - International Journal of Statistics, 2011, vol. LXIX, n. 1, pp. 45-65, URL ftp://metron.sta.uniroma1.it/RePEc/articoli/2011-1-3.pdf. Deville, J. C. (1999). Variance estimation for complex statistics and estimators: linearization and residual techniques. Survey Methodology, 25, 193-203, URL http://www5.statcan.gc.ca/bsolc/olc-cel/olc-cel?lang=eng&catno=12-001-X19990024882.

See Also

lingini, varpoord, linqsr, var_srs

Examples

Run this code
data(eusilc)
dati <- data.frame(1:nrow(eusilc),eusilc)
colnames(dati)[1] <- "IDd"
dat1 <- lingini2("eqIncome","IDd",weight = "rb050",Dom=c("db040"),dataset=dati)
dat2 <- lingini2("eqIncome","IDd",weight = "rb050",dataset=dati)

dat1$value
dat2$value

Run the code above in your browser using DataLab