R/fnfam.R

"fnfam" <-
function(n,power,alpha,p1,h)
 {
  nhp <- n*2*h
  s <- sqrt(p1*(1-p1)/nhp)
 pb <- p1 - s*qnorm(power)
 f <- 2*n*2*h*(pb*log(pb) + (1-pb)*log(1-pb) - log(0.5)) - (qnorm(alpha))^2 
 return(f)
 }

Try the powerpkg package in your browser

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

powerpkg documentation built on May 20, 2022, 1:09 a.m.