R/median.test.onesample.signtest.simple.R

Defines functions median.test.onesample.signtest.simple

#Pg 325 - single sample median test
#Sheskin pg 326 - less powerful than Wilcoxon 1 sample test
median.test.onesample.signtest.simple <- function(
   n.below = 0
  ,n.equal = 0 #Future use...
  ,n.above = 0
  ,null.hypothesis.location = 0
  #,include.ties = F - TODO: Better Tie Behavior...
  ,alternative = c("two.sided","greater","less")
  ,conf.level = 0.95
  #,location.name = c("median", "mean")
) {
  validate.htest.alternative(alternative = alternative)
  
  n <- n.below + n.above
  
  b.test <- proportion.test.onesample.exact.simple(sample.proportion = n.above/n
                                                   ,null.hypothesis.proportion = .5
                                                   ,sample.size = n
                                                   ,alternative = alternative
                                                   ,conf.level = conf.level
                                                   )
  
  
  
  b.test
  
  
}

#median.test.onesample.signtest.simple(n.above = 3, n.below = 6)
burrm/lolcat documentation built on Sept. 15, 2023, 11:35 a.m.