Learn R Programming

vardpoor (version 0.2.0.8.1)

lingini: Linearization of the GINI coefficient I

Description

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

Usage

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

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 Osier 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. Guillaume Osier (2009). Variance estimation for complex indicators of poverty and inequality. Journal of the European Survey Research Association, Vol.3, No.3, pp. 167-195, ISSN 1864-3361, URL https://ojs.ub.uni-konstanz.de/srm/article/view/369. 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

lingini2, linqsr, varpoord, var_srs

Examples

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

Run the code above in your browser using DataLab