Description Usage Arguments Value Author(s) Examples
Proportion estimated using the survey sample and confidence intervals based on the Clopper–Pearson approach.
1 2 3 4 5 6 7 8 9 10 | survey_sample(
R,
n,
alpha = 0,
beta = 0,
gamma = 0.05,
pi0 = 0,
simulation = FALSE,
...
)
|
R |
A |
n |
A |
alpha |
A |
gamma |
A |
... |
Additional arguments. |
beta0 |
A |
A CPreval
object with the structure:
estimate: Estimated proportion
sd: Estimated standard error of the estimator
ci_asym: Asymptotic confidence interval
ci_cp: Confidence interval based on the Clopper–Pearson approach
gamma: Confidence level (i.e. 1 - gamma) for confidence interval
method: Estimation method (in this case sample survey)
measurement: A vector with (alpha0, alpha, beta0, beta)
...: Additional parameters
Stephane Guerrier
1 2 3 4 5 6 7 8 9 | # Samples without measurement error
X = sim_Rs(p = 30/1000, pi0 = 10/1000, n = 1500, seed = 18)
survey_sample(X$R, X$n)
# With measurement error
X = sim_Rs(p = 30/1000, pi0 = 10/1000, n = 1500, alpha0 = 0.01,
alpha = 0.01, beta0 = 0.05, beta = 0.05, seed = 18)
survey_sample(X$R, X$n)
survey_sample(X$R, X$n, alpha = 0.01, beta = 0.05)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.