the PIP API is returning two values for alternative aggregate data (e.g., AFW) when one of the underlying group data tables does not mean normality in the poverty lines provided by the user. You can run the following and see that instead of one the API returns two.
The problem is that in wbpip when neither the lorenz nor the quadratic meet normality, the value of the poverty line is set to NA in this line. Do you know is there is reason for that? I can understand the rationale behind making the estimates equal to NA, but I don't understand why the value of the poverty line should be set to NA as well. Since the poverty line is used as a "byable" variable in pipapi, I think the problem should be fixed directly in wbpip. This PR fixes the problem, making sure the value of the poverty line in lorenz and quadratic is the same (which should be by construction).
Hi @tonyfujs ,
the PIP API is returning two values for alternative aggregate data (e.g., AFW) when one of the underlying group data tables does not mean normality in the poverty lines provided by the user. You can run the following and see that instead of one the API returns two.
Or, using
pipr
:The problem is that in
wbpip
when neither the lorenz nor the quadratic meet normality, the value of the poverty line is set toNA
in this line. Do you know is there is reason for that? I can understand the rationale behind making the estimates equal toNA
, but I don't understand why the value of the poverty line should be set toNA
as well. Since the poverty line is used as a "byable" variable inpipapi
, I think the problem should be fixed directly inwbpip
. This PR fixes the problem, making sure the value of the poverty line in lorenz and quadratic is the same (which should be by construction).Thanks.