CSBLatvia/vardpoor

possible typo in the linearization of gpg

Closed this issue · 1 comments

https://github.com/CSBLatvia/vardpoor/blob/master/vardpoor/R/lingpg.R#L210

It seems that in the formula
lin <- 100*(1-gpg)*((indic_men/Nwomen)-(indic_men/Nmen)+((x*indic_men)/SINCmen)-((x*indic_women)/SINCwomen))
of the file in the link above there is a mistake. Shouldn't be indic_women/Nwomen instead of indic_men/Nwomen?
By doing that the result matches with the result by the function svycontrast of library survey.

Thank you for the bug you have found! It has been corrected in the vardpoor version 0.4.4. It is available on the CRAN.