Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

in_CI

Indicator Function for Analyzing Coverage


Description

Indicator function for analyzing coverage. The output indicates whether a value lies within a computed confidence interval.

Usage

in_CI(est, se, true, level=0.95, df=Inf)

Arguments

est

Vector of estimates

se

Vector of standard errors

true

Vector of true parameters

level

Confidence level

df

Degrees of freedom for t distribution. The default corresponds to the normal distribution.

Value

Logical vector

Examples

#############################################################################
# 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 )

miceadds

Some Additional Multiple Imputation Functions, Especially for 'mice'

v3.11-6
GPL (>= 2)
Authors
Alexander Robitzsch [aut,cre] (<https://orcid.org/0000-0002-8226-3132>), Simon Grund [aut] (<https://orcid.org/0000-0002-1290-8986>), Thorsten Henke [ctb]
Initial release
2021-01-21 11:48:47

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.