R/wald-ci-wald.R

Defines functions CIWald

Documented in CIWald

#' Wald Confidence Intervals
#'
#' @author Ivan Jacob Agaloos Pesigan
#'
#' @inherit .CIWald return description
#' @inheritParams .CIWald
#'
#' @family Wald Functions
#' @keywords wald
CIWald <- function(est,
                   se,
                   theta = 0,
                   alpha = c(0.05, 0.01, 0.001),
                   z = FALSE,
                   df,
                   test = FALSE) {
  stopifnot(
    is.vector(est),
    is.vector(se),
    is.vector(theta),
    is.vector(alpha),
    !any(alpha <= 0),
    !any(alpha > 1),
    length(est) == length(se)
  )
  if (length(theta) > 1) {
    stopifnot(
      length(est) == length(theta)
    )
  }
  .CIWald(
    est = est,
    se = se,
    theta = theta,
    alpha = alpha,
    z = z,
    df = df,
    test = test
  )
}
jeksterslab/wald documentation built on July 14, 2022, 8:05 a.m.