Learn R Programming

pempi Overview

The proportion estimation with marginal proxy information (pempi) package, allows to estimate and build confidence intervals for proportions, from random or stratified samples and census data with participation bias. Measurement errors in the form of false positive and false negative are also included in the inferential procedure. The pempi package also contains code for simulation studies and sensitivity analysis reported in the companion paper Guerrier et al. (2023), as well as the Austrian dataset on COVID-19 prevalence in November 2020.

Remark on notation

The notation and conventions used in Guerrier et al. (2023) are slightly amended for convenience in this package. In particular, we use R1 instead R11, R2 instead of R10, R3 instead of R01 and R4 instead of R00.

Package installation

The pempi package can be installed from GitHub as follows:

# Install devtools
install.packages("devtools")

# Install the package from GitHub
devtools::install_github("stephaneguerrier/pempi")

Note that Windows users are assumed that have Rtools installed (if this is not the case, please visit this link).

How to cite

@Manual{guerrier2023cape,
    title = {{pempi}: Proportion estimation with marginal proxy information},
    author = {Guerrier, S and Kuzmics, C and Victoria-Feser, M.-P.},
    year = {2023},
    note = {R package},
    url = {https://github.com/stephaneguerrier/pempi}
}

License

The license this source code is released under is the GNU AFFERO GENERAL PUBLIC LICENSE (AGPL) v3.0. Please see the LICENSE file for full text. Otherwise, please consult GNU which will provide a synopsis of the restrictions placed upon the code.

References

Guerrier, Stéphane, Christoph Kuzmics, and Maria-Pia Victoria-Feser. 2023. “Assessing COVID-19 Prevalence in Austria with Infection Surveys and Case Count Data as Auxiliary Information”, https://arxiv.org/abs/2012.10745.

Copy Link

Version

Install

install.packages('pempi')

Monthly Downloads

149

Version

1.0.0

License

AGPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

St<c3><a9>phane Guerrier

Last Published

October 9th, 2023

Functions in pempi (1.0.0)

print.cpreval_sim

Print (simulated) sample
sim_Rs

Simulate data (R, R0, R1, R2, R3 and R4)
update_prevalence

Update prevalence using new case prevalence rates
moment_estimator

Compute moment-based estimator.
survey_mle

Compute proportion in the survey sample (standard estimator)
neg_log_wlik

Negative Weighted Log-Likelihood function
get_prob

Compute sucess probabilities (tau_j's)
marginal_mle

Compute (marginalized) MLE based on the partial information R1 and R3.
conditional_mle

Compute MLE based on the full information R1, R2, R3 and R4.
neg_log_lik

Negative Log-Likelihood function
covid19_austria

COVID-19 Data from Statistics Austria
print.cpreval

Print estimation results
neg_log_lik_integrated

Negative marginalized log-likelihood function based on R0 and R
log_modified

Modified log function (internal function)