R/TwoSampleProportion.Equivalence.R

Defines functions TwoSampleProportion.Equivalence

Documented in TwoSampleProportion.Equivalence

TwoSampleProportion.Equivalence <-
function(alpha,beta,p1,p2,k,delta,margin){
    n2<-(qnorm(1-alpha)+qnorm(1-beta/2))^2*(p1*(1-p1)/k+p2*(1-p2))/(margin-abs(delta))^2
    n1<-k*n2
    return(n1)
}

Try the TrialSize package in your browser

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

TrialSize documentation built on July 8, 2020, 7:19 p.m.