in_CI.Rd
Indicator function for analyzing coverage. The output indicates whether a value lies within a computed confidence interval.
in_CI(est, se, true, level=0.95, df=Inf)
Vector of estimates
Vector of standard errors
Vector of true parameters
Confidence level
Degrees of freedom for \(t\) distribution. The default corresponds to the normal distribution.
Logical vector
#############################################################################
# EXAMPLE 1: Toy example
#############################################################################
#-- simulate estimates and standard errors
set.seed(987)
n <- 10
est <- stats::rnorm( n, sd=1)
se <- stats::runif( n, 0, .7 )
level <- .95
true <- 0
#-- apply coverage function
in_ci <- miceadds::in_CI( est, se, true)
#-- check correctness
cbind( est, se, true, in_ci )