PIP-Technical-Team / wbpip

Official methodological Stats of PIP
https://pip-technical-team.github.io/wbpip/
Other
3 stars 1 forks source link

Issue with popshare computations #158

Open tonyfujs opened 3 years ago

tonyfujs commented 3 years ago

ARG, 1994, popshare = 0.2 gives different results from PovCalNet. The issue comes from md_compute_poverty_stats() pov_status <- welfare <= povline_lcu gives correct results for this query. I don't know if other queries are negatively affected however... image

cc @randrescastaneda

tonyfujs commented 3 years ago

Currently no code to deal with situations where there are jumps in the distribution. Add unit tests for this.

randrescastaneda commented 3 years ago

Thanks Tony, but the formula was ok without the = sign (pov_status <- welfare <= povline_lcu). If povcalnet had it with the = sign before, I think it was wrong. Check page 69 of the document below. https://elibrary.worldbank.org/doi/pdf/10.1596/978-0-8213-7613-3

Best,

R.Andrés Castañeda

tonyfujs commented 3 years ago

Thanks @randrescastaneda I just have updated this. I discussed with Minh last week, and he tolsd me the formula is correct, but there is an issue somewhere with popshare computations...

randrescastaneda commented 3 years ago

Hi @tonyfujs, In branch improve_compute_bins I updated the methodology for getting bins, since the one that we had did not match with the _ebin Stata command that the Poverty GP uses. Yet, that branch was never merged into master. You could run the check in that branch and see if it works. The problem is that it is a very old branch so I don't know if it will fit well in the current structure. Best,