The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.
dceasimR provides five inequality measures commonly used
in DCEA: SII, RII, concentration index, Atkinson index, and Gini
coefficient.
The SII estimates the absolute health difference from the most to the least deprived using a weighted regression on ridit scores.
calc_sii(df, "mean_hale", "group", "pop_share")
#> $sii
#> [1] 18.15
#>
#> $rii
#> [1] 0.304326
#>
#> $se_sii
#> [1] 0.4112988
#>
#> $p_value
#> [1] 2.561597e-05
#>
#> $model
#>
#> Call:
#> stats::lm(formula = h ~ ridit, weights = w)
#>
#> Coefficients:
#> (Intercept) ridit
#> 50.57 18.15A positive SII means better health in more advantaged groups.
The RII expresses the SII relative to mean health, facilitating comparisons across populations and time.
calc_rii(df, "mean_hale", "group", "pop_share")
#> $sii
#> [1] 18.15
#>
#> $rii
#> [1] 0.304326
#>
#> $se_sii
#> [1] 0.4112988
#>
#> $p_value
#> [1] 2.561597e-05
#>
#> $model
#>
#> Call:
#> stats::lm(formula = h ~ ridit, weights = w)
#>
#> Coefficients:
#> (Intercept) ridit
#> 50.57 18.15
#>
#>
#> $se_rii
#> [1] 0.006896357calc_all_inequality_indices(df, "mean_hale", "group", "pop_share",
epsilon_values = c(0.5, 1, 2))
#> # A tibble: 7 × 3
#> index value description
#> <chr> <dbl> <chr>
#> 1 sii 18.1 Slope Index of Inequality
#> 2 rii 0.304 Relative Index of Inequality
#> 3 concentration_index 0.0487 Concentration Index (standard)
#> 4 gini 0.0487 Gini coefficient
#> 5 atkinson_epsilon_0.5 0.00187 Atkinson index (epsilon = 0.5)
#> 6 atkinson_epsilon_1 0.00374 Atkinson index (epsilon = 1)
#> 7 atkinson_epsilon_2 0.00751 Atkinson index (epsilon = 2)library(ggplot2)
ggplot(ld, aes(cum_pop, cum_health)) +
geom_line(colour = "steelblue", linewidth = 1) +
geom_abline(linetype = "dashed") +
labs(x = "Cumulative population", y = "Cumulative health",
title = "Lorenz Curve") +
theme_minimal()These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.