Description Usage Arguments Value Examples
Calculates the confidence interval for the estimator considered.
1 | confidence_interval(estimation, std_dev, confidence = 0.95)
|
estimation |
A numeric value specifying the point estimation. |
std_dev |
A numeric value specifying the standard deviation of the point estimation. |
confidence |
A numeric value between 0 and 1 specifying the confidence level, taken as 1 - alpha (1 - Type I error). By default, its value is 0.95. |
A vector containing the lower and upper bounds.
1 2 3 4 5 6 7 8 9 | covariates = c("education_primaria","education_secundaria",
"age", "sex")
pi = propensities(sampleNP, sampleP, covariates, algorithm = "glm", smooth = FALSE)
psa_weights = sc_weights(pi$convenience)
N = 50000
Y_est = total_estimation(sampleNP, psa_weights, estimated_vars = "vote_pens", N = N)
VY_est = fast_jackknife_variance(sampleNP, psa_weights,
estimated_vars = "vote_pens") * N^2
confidence_interval(Y_est, sqrt(VY_est), confidence = 0.90)
|
Loading required package: lattice
Loading required package: ggplot2
lower.vote_pens upper.vote_pens
16974.82 19537.56
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.