Closed SimonMolinsky closed 7 months ago
@Arturstrag, how is it going? Would you like some help with this task?
@Arturstrag I'd like to take this issue from you :) If this is okay, then on Monday (5th of Feb), I'll change the assignment of the issue.
Ok
Abul Naga and Yalcin indices
Create a function to calculate Abul Naga and Yalcin indices from ordinal data. The function definition is:
where:
ds
: sorted or unsorted dataset, an array with responses on an ordinal scale,a_param
: $\alpha$ parameter, must be positive and greater or equal to 1, the default value is 1,b_param
: $\beta$ parameter, must be positive and greater or equal to 1; the default value is 1.Parameters
a_param
andb_param
are designed to put different weights to inequalities below and above the median (see example below).Steps
The algorithm has five steps:
ds
. It must be an integer!where:
and:
$$k_{\alpha , \beta}=(m-1)(\frac{1}{2})^{\alpha}-[1-(n-m)(\frac{1}{2})^{\beta}]$$
With $(\alpha=\beta)$ inequality is at a minimum when everyone is in the same category and at a maximum when half of the population lies in the lowest category and half in the highest category. Different calibrations of the parameters $\alpha$ and $\beta$ allow the researcher to give different weights to inequalities above and below the median of the responsiveness distribution - for higher values of $\alpha$ ($\beta$), less weight is given to inequalities below (above) the median. However, by design, the index can only be used to compare distributions with the same median category [1].
Returns
Abul Naga and Yalcin index:
float
Bibliography
[1] Abul Naga RH, Yalcin T. Inequality measurement for ordered response health data. J Health Econ. 2008 Dec;27(6):1614-25. doi: 10.1016/j.jhealeco.2008.07.015. Epub 2008 Aug 19. PMID: 18838185.
[2] Andrew M. Jones, Nigel Rice, Silvana Robone, Pedro Rosa Dias. Inequality and Polarisation in Health Systems’ Responsiveness: A Cross- Country Analysis. HEDG Working Paper 10/27, October 2010. URL: https://www.york.ac.uk/media/economics/documents/herc/wp/10_27.pdf