I am trying to get two sample sizes (treatment vs. control) for differences in proportions (e.g. 80% vs. 70% of success), for non-inferiority and equivalence trials with R-package TrialSize. Actually I have two questions:

1) when writing the formula, both for equivalence and non-inferiority design, I am asked to insert "superiority or non-inferiority margin": I know this should be set so the alternative hypothesis is |p1 - p2| > margin, but I don't know how should it be set. Is there a rule? 

2) if I set "superiority or non-inferiority margin" at 0.005, for example, and compute the sample size for equivalence trial and non-inferiority trial, I get the same sample size!!! So should this "margin" be kept lower in non-inferiority design than in equivalence design?

I know there should be something wrong, but I cannot find where the mistake is!

Thanks to everybody for answering :-)

Similar questions and discussions