Skip to contents

Estimate distribution (grouped data)

Usage

gd_estimate_distribution(
  welfare,
  population,
  gd_type,
  mean,
  povline,
  popshare = NULL
)

Arguments

welfare

numeric: Cumulative proportion of welfare held by that proportion of the population (Lorenz Curve).

population

numeric: Cumulative proportion of population.

gd_type

integer: Type of data distribution If gd_type = 1 population must be the cumulative proportion of population and welfare must be the cumulative proportion of income held by that proportion of the population (Lorenz curve). If gd_type = 2, population must be the proportion of population and welfare must be the proportion of income. If gd_type = 5, then population must be the Percentage of the population in a given interval of incomes, whereas welfare must be the mean income of that interval.

mean

numeric: Data mean

povline

numeric: Poverty line.

popshare

numeric: Share of population living below the poverty line. Optional.

Value

data.frame

Examples

welfare <- c(24.84, 35.8, 45.36, 55.1, 64.92, 77.08, 91.75, 110.64, 134.9,
167.76, 215.48, 261.66, 384.97)
population <- c(0.92, 2.47, 5.11, 7.9, 9.69, 15.24, 13.64, 16.99, 10, 9.78,
3.96, 1.81, 2.49)

gd_estimate_distribution(welfare = welfare,
population = population,
gd_type = 5,
mean = 109.9,
povline = 89)
#> $poverty_line
#> [1] 89
#> 
#> $mean
#> [1] 109.9
#> 
#> $median
#> [1] 94.32544
#> 
#> $headcount
#> [1] 0.450615
#> 
#> $poverty_gap
#> [1] 0.1247435
#> 
#> $poverty_severity
#> [1] 0.04751729
#> 
#> $watts
#> [1] 0.1647381
#> 
#> $gini
#> [1] 0.2890132
#> 
#> $mld
#> [1] 0.1376764
#> 
#> $polarization
#> [1] 0.2349451
#> 
#> $deciles
#>  [1] 0.03911907 0.05156047 0.06195715 0.07149438 0.08094991 0.09106730
#>  [7] 0.10288949 0.11849235 0.14404545 0.23842444
#>