R/t_calc.R

Defines functions t_calc

#' Calculates the t_value
#' @noRd
#' @keywords internal
#'
#' @param sig_level the significance level
#' @param two_sided whether the two sided t statistics or single sided should be calculated
#' @param df = degrees of freedom
#'
#' @importFrom stats qt
t_calc <- function(sig_level = 0.05,
                   two_sided = TRUE,
                   df) {
  ifelse(two_sided,
         abs(qt(sig_level / 2, df)),
         abs(qt(sig_level, df)))
}

Try the metaHelper package in your browser

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

metaHelper documentation built on Sept. 11, 2024, 6:43 p.m.