R/median.test.onesample.signtest.R

Defines functions median.test.onesample.signtest

median.test.onesample.signtest <- function(
  x
  ,null.hypothesis.location = 0
  ,alternative = c("two.sided","greater","less")
  ,conf.level = .95
) {
  validate.htest.alternative(alternative = alternative)
  
  x <- na.omit(x)
  d <- x - null.hypothesis.location

  n.above = length(which(d > 0))  
  n.equal = length(which(d == 0))  
  n.below = length(which(d < 0))  
  
  median.test.onesample.signtest.simple(n.below = n.below
                                        ,n.equal = n.equal
                                        ,n.above = n.above
                                        ,null.hypothesis.location = null.hypothesis.location
                                        ,alternative = alternative
                                        ,conf.level = conf.level
                                        )
  
}
burrm/lolcat documentation built on Sept. 15, 2023, 11:35 a.m.