This function calculates the relative concentration index (Kakwani et al.), the generalized concentration index (Clarke et al., 2002), the Wagstaff index for bounded variables (Owen et al. 2016), and the concentration index with Erreygers' correction (Erreygers et al., 2009). It returns an object of class hci for which confidence intervals, summaries and plots are defined.
ci(
ineqvar,
outcome,
weights = NULL,
type = c("CI", "CIg", "CIc", "CIw"),
method = c("linreg_delta", "linreg_convenience", "cov_convenience", "direct"),
df_correction = TRUE,
robust_se = FALSE,
rse_type = "HC3",
rank_function = rineq::rank_wt
)An S3 object of class hci. Contains:
concentration_index The concentration index
type The type
method The method used for calculation
variance The variance,used for calculation of confidence intervals
fractional_rank Computed fractional rank NA
outcome Outcome after removing NA
call Call signature
n Number of observations after removing NA
robust_se Were robust standard errors calculated?
rse_type Type of robust standard errors.
df_correction Do the degrees of freedom correspond to a sample?
Used for ranking, usually relates to the socioeconomic position, for example income.
The variable in which the inequality should be measures, for example health.
Optional, used to weigh the observations. Defaults to equal weights for all observations.
Character, the type of concentration index to be calculated: relative concentration index (CI, default), generalized concentration index (CIg), concentration index with Erreygers Correction CIc, or Wagstaff concentration index suitable for bounded and binary outcomes CIw
Character, defines the calculation method. One of:
linreg_delta: Based on linear regression without transforming the left hand side variable. Computes correct standard errors that take into account the sampling variability of the estimate of the mean (O’Donnell et al. 2008, Owen et al. 2016)
linreg_convenience): Based on simpler regression with transformed left hand side variable. Standard errors do not take into account the sampling variability of the estimate of the mean(O’Donnell et al. 2008, Owen et al. 2016)
cov_convenience: Based on covariance. Equivalent to linreg_convenience (O’Donnell et al. 2008, Owen et al. 2016)
direct: Using direct formula, standard errors do no take weighting appropriately into account (O’Donnell et al. 2008, Kakwani et al. 1997)
If TRUE (default), calculates the concentration index based on the population variance (derived from the sample variance).
Uses robust standard errors if TRUE. Only available for the linreg_* type methods. Requires the sandwich package.
Character, type argument for the vcovHC(). HC3' is suggested as default, set to HC1 for Stata compatibility. See ?sandwich::vcovHC() for options.
Function to calculate the weighted rank of ineqvar. Takes two arguments: the variable that holds the rank order information, and the weights for the ranks. rineq currently provides two, rank_wt (default, corresponds to code provided in the World Bank report by O’Donnell et al.,2008) and rank_gwt (generalized handling of ties as also used by the Stata Conindex command, initially published by van Ourti, (2004)).
Clarke, P. M., Gerdtham, U. G., Johannesson, M., Bingefors, K., & Smith, L. (2002). On the measurement of relative and absolute income-related health inequality. Social Science & Medicine, 55(11), 1923-1928
Erreygers, G. (2009). Correcting the concentration index. Journal of health economics, 28(2), 504-515
Kakwani, N., Wagstaff, A., & Van Doorslaer, E. (1997). Socioeconomic inequalities in health: measurement, computation, and statistical inference. Journal of econometrics, 77(1), 87-103.
O'Donnel, O., O'Neill S., Van Ourti T., & Walsh B. (2016). Conindex: Estimation of Concentration Indices. The Stata Journal, 16(1): 112-138.
O’Donnell, O., Van Doorslaer, E. , Wagstaff, A., Lindelow, M., 2008. Analyzing Health Equity Using Household Survey Data: A Guide to Techniques and Their Implementation, World Bank Publications. The World Bank.
van Ourti, T., 2004. Measuring horizontal inequity in Belgian health care using a Gaussian random effects two part count data model. Health Economics, 13: 705–724.
# Direct
data(housing)
ci.bmi <- ci(ineqvar = housing$income, outcome = housing$bmi, method = "direct")
summary(ci.bmi)
# retrieve value
ci.bmi$concentration_index
# obtain confidence intervals
confint(ci.bmi, level = 0.95)
plot(ci.bmi)
# Wagstaff type with binary outcome and robust standard errors
# that should correspond to Stata (depends on 'sandwich'):
ci.bmi.b <- ci(housing$income, housing$high.bmi, type = "CIw", robust_se = TRUE,
rse_type = "HC1")
Run the code above in your browser using DataLab