R/samplesize.d.R

samplesize.d <- function(delta, power=.80, sig.level=.05){
	n <- 2*((qnorm(sig.level/2,lower.tail=FALSE)-qnorm(power,lower.tail=FALSE))/
	delta)^2+(qnorm(sig.level/2,lower.tail=FALSE)^2)/4
	return(ceiling(n))
}

Try the rpsychi package in your browser

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

rpsychi documentation built on May 1, 2019, 10:10 p.m.