R/size.prop.test.R

Defines functions size.prop.test

Documented in size.prop.test

size.prop.test <- function(p=NULL,alpha,delta){
  u <- qnorm(1-alpha/2)^2
  if (is.null(p)) 
    {n <- u^2/(4*delta^2)} 
  else {n <- p*(1-p)*u^2/(delta^2)}
  return(ceiling(n))
}

Try the OPDOE package in your browser

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

OPDOE documentation built on May 1, 2019, 8:45 p.m.