R/fx.R

"fx" <-
function(bta,n,alpha,p1,s)
 {
 pb <- p1 - s*bta
 f <- 2*n*(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.