R/tablePvalue.R

Defines functions tablePvalue

tablePvalue <- function(k, m, chisq_bar) {
  table_chisq <- vapply(
    X = seq(2L, k),
    FUN = function(m) pchisq(chisq_bar, m - 1L, lower.tail = FALSE),
    FUN.VALUE = vector("double", 1L)
  )
  table_p <- chacko63_tab1[seq(2, k), k - 2]
  return(sum(table_chisq * table_p))
}

Try the permChacko package in your browser

Any scripts or data that you put into this service are public.

permChacko documentation built on May 29, 2024, 2:14 a.m.