R/myci.R

Defines functions myci

Documented in myci

#' Title myci
#'
#' @param x a vector of data for the sample
#'
#' @return 2 numbers that give a 95% ci
#' @export
#'
#' @examples
#' myci(2,3,4)
myci=function(x){
  n=length(x)
  t=qt(1-0.05/2,n-1)
  ci=c()
  ci[1]=mean(x)-t*sd(x)/sqrt(n)
  ci[2]=mean(x)+t*sd(x)/sqrt(n)
  ci
}
anishkapeter/MATH4753FALLANISHKA documentation built on Dec. 19, 2021, 3:38 a.m.