R/report_kt.R

Defines functions report_kt

Documented in report_kt

#' Report the Kruskal test of medians
#'
#' Report the results of Kruskal-Wallis Rank Sum test as performed by kruskal.test()
#'
#' @param model Model object from which to extract chisq-value.
#'
#' @export

report_kt <- function(model) {
  p <- model$p.value
  p <- fix_p(p)

  paste0("chi-square(", model$parameter, ") = ",
         round(model$statistic, 2), ", ",
         fix_p(model$p.value))
}
Joe-Hilgard/hilgard documentation built on June 8, 2018, 12:14 p.m.