R/bias_m.R

Defines functions calculate_m

Documented in calculate_m

#' Calculate M
#' @importFrom stats qt
#'
#' @param df degrees of freedom
#' @param conf.level confidence interval
#' @param nsamples number of samples
#'
#' @return m factor
calculate_m <- function(df, conf.level=95, nsamples = 1){
  a = 1-(((100-conf.level)/100)/(2*nsamples))

  return(round(qt(a, df), 2))
}

Try the CLSIEP15 package in your browser

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

CLSIEP15 documentation built on Nov. 11, 2023, 1:08 a.m.