R/pois.test.R

Defines functions pois.test

Documented in pois.test

#[export]
pois.test <- function(y, logged = FALSE) {
  stat <- ( Rfast::Var(y)/mean(y) - 1) * sqrt( 0.5 * (length(y) - 1) )
  pval <- 2 * pnorm(abs(stat), lower.tail = FALSE, log.p = logged)
  c(stat, pval)
}

Try the Rfast package in your browser

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

Rfast documentation built on Nov. 9, 2023, 5:06 p.m.