confidence_interval {NonProbEst} | R Documentation |
Confidence interval
Description
Calculates the confidence interval for the estimator considered.
Usage
confidence_interval(estimation, std_dev, confidence = 0.95)
Arguments
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. |
Value
A vector containing the lower and upper bounds.
Examples
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)
[Package NonProbEst version 0.2.4 Index]