R/mytstat.R

Defines functions mytstat

Documented in mytstat

#' @title A function which outputs the t statistic for given sample data.
#'
#' @param z The sample data to return the t statistic for.
#'
#' @return The t-statistic for the sample data.
#' @export
#'
#' @examples
#' \dontrun{mytstat(c(1,2,3,4,5), 3)}
mytstat<-function(z, mu0){ # The value of t when the NULL is assumed true (xbar-muo)/z/sqrt(n)
  sqrt(length(z))*(mean(z)-mu0)/sd(z)
}
ShilohBeeler/shilohMATH4753 documentation built on Nov. 21, 2020, 9:10 a.m.