survey_mle {pempi}R Documentation

Compute proportion in the survey sample (standard estimator)

Description

Proportion estimated using the survey sample and confidence intervals based on the Clopper-Pearson and the standard asymptotic approach.

Usage

survey_mle(R, n, pi0 = 0, alpha = 0, beta = 0, gamma = 0.05, V = NULL, ...)

Arguments

R

A numeric that provides the people of positive people in the sample.

n

A numeric that provides the sample size.

pi0

A numeric that provides the prevalence or proportion of people (in the whole population) who are positive, as measured through a non-random, but systematic sampling (e.g. based on medical selection). Default value is 0 and in this case this information is not used in the estimation procedure.

alpha

A numeric that provides the False Negative (FN) rate for the sample R. Default value is 0.

beta

A numeric that provides the False Positive (FP) rate for the sample R. Default value is 0.

gamma

A numeric that is used to compute a (1 - gamma) confidence region for the proportion. Default value is 0.05.

V

A numeric that corresponds to the average of squared sampling weights. Default value is NULL.

...

Additional arguments.

Value

A cpreval object with the structure:

Author(s)

Stephane Guerrier, Maria-Pia Victoria-Feser, Christoph Kuzmics

Examples

# Samples without measurement error
X = sim_Rs(theta = 30/1000, pi0 = 10/1000, n = 1500, seed = 18)
survey_mle(R = X$R, n = X$n)

# With measurement error
X = sim_Rs(theta = 30/1000, pi0 = 10/1000, n = 1500, alpha = 0.01, beta = 0.05, seed = 18)
survey_mle(R = X$R, n = X$n)
survey_mle(R = X$R, n = X$n, alpha = 0.01, beta = 0.05)

[Package pempi version 1.0.0 Index]