ci | R Documentation |
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
)
ineqvar |
Used for ranking, usually relates to the socioeconomic position, for example income. |
outcome |
The variable in which the inequality should be measures, for example health. |
weights |
Optional, used to weigh the observations. Defaults to equal weights for all observations. |
type |
Character, the type of concentration index to be calculated: relative concentration index ( |
method |
Character, defines the calculation method. One of:
|
df_correction |
If |
robust_se |
Uses robust standard errors if |
rse_type |
Character, type argument for the |
rank_function |
Function to calculate the weighted rank of |
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?
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.