Test of equivalence of two independent proportions x1/n1 and x2/n2 within a margin. Two one-sided tests of
H01: p1 - p2 <= -margin and H02: p1 - p2 >= margin, each at level alpha; equivalence is shown when both reject.
Not an R function. (The R packages in scope give the dual intervals, DescTools::BinomDiffCI, or test one bound at
a time.)
The statistic at a bound delta0 is z = (p1 - p2 - delta0) / sqrt(var), with var the variance of p1 - p2 at the
maximum likelihood estimate of (p1, p2) under p1 - p2 = delta0 (Farrington and Manning 1990, "mee"), the same times
N/(N - 1) (Miettinen and Nurminen 1985, "mn", the default), or at the observed proportions ("wald"). The
p-values are normal tails. The test is dual to binomDiffCI with the same method at the level 1 - 2 alpha:
equivalence is shown exactly when that interval, returned as confInt, lies inside (-margin, margin).
The Wald variance is 0 when both proportions are 0 or 1: the statistics are then infinite and the p-values 0 or 1,
as binomDiffCI's Wald interval is a point there.
Test of equivalence of two independent proportions x1/n1 and x2/n2 within a margin. Two one-sided tests of H01: p1 - p2 <= -margin and H02: p1 - p2 >= margin, each at level
alpha; equivalence is shown when both reject. Not an R function. (The R packages in scope give the dual intervals,DescTools::BinomDiffCI, or test one bound at a time.)The statistic at a bound delta0 is z = (p1 - p2 - delta0) / sqrt(var), with var the variance of p1 - p2 at the maximum likelihood estimate of (p1, p2) under p1 - p2 = delta0 (Farrington and Manning 1990,
"mee"), the same times N/(N - 1) (Miettinen and Nurminen 1985,"mn", the default), or at the observed proportions ("wald"). The p-values are normal tails. The test is dual to binomDiffCI with the same method at the level 1 - 2 alpha: equivalence is shown exactly when that interval, returned asconfInt, lies inside (-margin, margin).The Wald variance is 0 when both proportions are 0 or 1: the statistics are then infinite and the p-values 0 or 1, as binomDiffCI's Wald interval is a point there.