R/p_val.R

Defines functions p_val

#' @noRd
#' @importFrom stats pnorm
p_val <- function(Coef, SE, beta_test) {
  # this functions calculates the two-sided p-values.
  diff_norm <- abs(Coef - beta_test) / SE
  p_val <- 2 * pnorm(diff_norm, lower.tail = FALSE)
  return(p_val)
}

Try the TSCI package in your browser

Any scripts or data that you put into this service are public.

TSCI documentation built on Oct. 10, 2023, 1:06 a.m.