Closed timriffe closed 2 years ago
I've checked off Theil and MLD because I have draft versions that match the results of the above conditional loop. These two functions are inside the file dev/theil_alternative.R
. The respective functions are named ineq_theil2()
and ineq_mld2()
. @alysonvanraalte please examine these and tell me whether these coincide with your expectations. Namely, the higher age conditional results are very different from the previous ones. They are however qualitatively similar to e.g. gini, so that's good. if you decide that these function versions are giving the right output, then just remove the 2 and replace the current versions with them.
Here's my test code to try to detect which implementations give the right conditional result:
From this, my take is that we need to look at
ineq_cov()
,ineq_theil()
,ineq_H()
, andineq_mld()
. So, here's a checklist:ineq_cov()
ineq_theil()
ineq_H()
ineq_mld()
Worst case scenario for these is we'll possibly need to loop in order to get the right conditional result. I excluded IQR and cp from this because they return a single scalar, although these could also be handled via looping.