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 |
n |
A |
pi0 |
A |
alpha |
A |
beta |
A |
gamma |
A |
V |
A |
... |
Additional arguments. |
Value
A cpreval
object with the structure:
estimate: Estimated proportion.
sd: Estimated standard error of the estimator.
ci_asym: Asymptotic confidence interval at the 1 - gamma confidence level.
gamma: Confidence level (i.e. 1 - gamma) for confidence intervals.
method: Estimation method (in this case sample survey).
measurement: A vector with (alpha0, alpha, beta).
boundary: A boolean variable indicating if the estimates falls at the boundary of the parameter space.
pi0: Value of pi0 (input value).
sampling: Type of sampling considered ("random" or "weighted").
V: Average sum of squared sampling weights if weighted/stratified is used (otherwise NULL).
...: Additional parameters.
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)