R/report_LR.R

Defines functions report_LR

Documented in report_LR

#' Report manually-made likelihood-ratio chisq-test
#'
#' Report an LR chisq-test as chisq(df) = chisq, p = .###.
#' I am considering deprecating this and replacing it with a generic
#' reporter function for manually-supplied chi-sqs or stats in general.
#' @param model Model object from which to extract chisq-value.
#' @param effect Parameter with chisq-value of interest
#'
#' @export

report_LR <- function(row) {

  df <- row$df

  chisq <- row$LR.chisq
  chisq <- numformat(chisq)

  p <- row$p.value
  p <- fix_p(p)

  output <- paste0("*chisq*(", df, ") = ", chisq, ", ", p)
  return(output)
}
Joe-Hilgard/hilgard documentation built on May 14, 2020, 9:15 p.m.