| epi.ssequb | R Documentation |
Sample size for a parallel equivalence or equality trial, binary outcome.
epi.ssequb(treat, control, delta, n, power, r = 1, type = "equivalence",
nfractional = FALSE, alpha = 0.05)
treat |
the expected proportion of successes in the treatment group. |
control |
the expected proportion of successes in the control group. |
delta |
the equivalence limit, expressed as the absolute change in the outcome of interest that represents a clinically meaningful difference. For an equivalence trial the value entered for |
n |
scalar, the total number of study subjects in the trial. |
power |
scalar, the required study power. |
r |
scalar, the number in the treatment group divided by the number in the control group. |
type |
a character string indicating the type of analysis to be run. Options are |
nfractional |
logical, return fractional sample size. |
alpha |
scalar, defining the desired alpha level. |
A list containing the following:
n.total |
the total number of study subjects required. |
n.treat |
the required number of study subject in the treatment group. |
n.control |
the required number of study subject in the control group. |
delta |
the equivalence limit, as entered by the user. |
power |
the specified or calculated study power. |
Consider a clinical trial comparing two groups, a standard treatment (s) and a new treatment (n). A proportion of subjects in the standard treatment group experience the outcome of interest P_{s} and a proportion of subjects in the new treatment group experience the outcome of interest P_{n}.
For an equivalence trial the null hypothesis is:
H_{0}: P_{n} - P_{s} \leq -\delta
H_{0}: P_{n} - P_{s} \geq +\delta
and the alternative hypothesis is:
H_{1}: P_{n} - P_{s} > -\delta
H_{1}: P_{n} - P_{s} < +\delta
If the alternative hypothesis is accepted we conclude that P_{n} is therapeutically equivalent to P_{s}. For an equivalence trial a two-sided test is used.
For an equality trial the null hypothesis is:
H_{0}: P_{n} - P_{s} = 0
and the alternative hypothesis is:
H_{1}: P_{n} - P_{s} \neq 0
If the alternative hypothesis is accepted we conclude that P_{n} differs from P_{s}. For an equality trial a two-sided test is used.
Note that when:
sign(P_n - P_s - \delta) \neq sign(z_{1-\alpha} + z_{1-\beta})
there is no solution for study power. For typical values of \alpha and \beta this would occur if P_{n} - P_{s} - \delta < 0. That is, when the targeted alternative is within the null hypothesis. The function issues a warning if these conditions are met.
When calculating study power the argument n refers to the total study size (that is, the number of subjects in the treatment group plus the number in the control group).
A summary of the key features of superiority, equivalence and non-superiority trial comparisons is shown in the following table (adapted from Machin et al., 2018 [page 170] and Wang et al., 2017):
| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- |
| Test for | Null hypothesis | Alternative hypothesis | Test |
| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- |
| Superiority | H_{0}: P_{n} - P_{s} \leq \delta | H_{1}: P_{n} - P_{s} > \delta | 1-sided or 2-sided |
| Equivalence | H_{0}: P_{n} - P_{s} \leq -\delta | H_{1}: P_{n} - P_{s} > -\delta | Two 1-sided tests |
H_{0}: P_{n} - P_{s} \geq +\delta | H_{1}: P_{n} - P_{s} < +\delta | ||
| Equality | H_{0}: P_{n} - P_{s} == 0 | H_{1}: P_{n} - P_{s} \neq 0 | 2-sided |
| Non-inferiority | H_{0}: P_{n} - P_{s} \leq -\delta | H_{1}: P_{n} - P_{s} > -\delta | 1-sided |
| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- |
Bennett J, Dismukes W, Duma R, Medoff G, Sande M, Gallis H, Leonard J, Fields B, Bradshaw M, Haywood H, McGee Z, Cate T, Cobbs C, Warner J, Alling D (1979). A comparison of amphotericin B alone and combined with flucytosine in the treatment of cryptoccal meningitis. New England Journal of Medicine 301, 126 - 131. DOI: 10.1056/nejm197907193010303.
Chow S, Shao J, Wang H (2008). Sample Size Calculations in Clinical Research. Chapman & Hall/CRC Biostatistics Series, pp. 91.
Ewald B (2013). Making sense of equivalence and non-inferiority trials. Australian Prescriber 36: 170 - 173.
Julious SA (2004). Sample sizes for clinical trials with normal data. Statistics in Medicine 23: 1921 - 1986.
Julious SA (2009). Estimating Samples Sizes in Clinical Trials. CRC, New York.
Machin D, Campbell MJ, Tan SB, Tan SH (2009). Sample Size Tables for Clinical Studies. Wiley Blackwell, New York.
Machin D, Campbell MJ, Tan SB, Tan SH (2018). Sample Sizes for Clinical, Laboratory and Epidemiology Studies. Wiley Blackwell, New York.
Wang B, Wang H, Tu X, Feng C (2017). Comparisons of superiority, non-inferiority, and equivalence trials. Shanghai Archives of Psychiatry 29, 385 - 388. DOI: 10.11919/j.issn.1002-0829.217163.
## EXAMPLE 1 (from Machin, Campbell, Tan and Tan 2009 p. 113):
## Bennett, Dismukes, Duma et al. (1979) designed a clinical trial to test
## whether combination chemotherapy for a shorter period would be at least
## as good as conventional therapy for patients with cryptococcal meningitis.
## They recruited 39 patients to each treatment arm and wished to conclude
## that a difference of less than 20% in response rate between the treatments
## would indicate equivalence. Assuming a one-sided test size of 10% and a
## power of 80% what would be a realistic sample size if the trial were
## to be repeated?
epi.ssequb(treat = 0.50, control = 0.50, delta = 0.20, n = NA, power = 0.80,
r = 1, type = "equivalence", nfractional = FALSE, alpha = 0.10)
## A total of 166 subjects need to be enrolled in the trial, 83 in the
## treatment group and 83 in the control group.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.