Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Sample size for equivalence trials in Stata

From   Joseph Coveney <>
To   Statalist <>
Subject   Re: st: Sample size for equivalence trials in Stata
Date   Sat, 01 Oct 2005 12:25:54 +0900

Lord Yupa wrote:

How can I calculate the sample size for an equivalence trial with stata?
The only hint is a program i found in statalist
(, but this
doesn't work for me (stata v8.2).


It seems as if Philip Ryan's program would work with Stata 8.2.  Did you
take note of the erratum
( ) that he posted
shortly afterward?

Regardless of whether you're working with proportions or another data type,
simulation would be an option.  See the references Philip give in this
regard in .  The basic
algorithm for proportions, for example, would be to generate a few thousand
sets of data at the boundary of the alternative hypotheses--that is, at your
chosen delta--using Joseph Hilbe's and Walter Linde-Zwirble's -rnd-, to
calculate confidence intervals for the risk difference (risk ratio or odds
ratio, whatever), and then to determine the proportion of the datasets in
which the confidence intervals contained zero (or one).

Joseph Coveney

*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index