fmecTest {nivm} | R Documentation |
Odds Ratio/Difference Non-inferiority tests
Description
Rohmel and Keier (2013) developed these non-inferioirty tests with variable margins. One margin function, NiM3, has the variable margin measuring a constant difference in proportions (0.10 in paper) after a threshold (0.20 proportion in the control group), or tests for differences defined in terms of a constant odds ratio (1.71 in paper) at values less than the threshold. The fmecTest
with type='max' gives the maximum of two p-values, either a difference in proportions test (one-sided asymptotic method of Farrington and Manning, 1990) or an odds ratio test (one-sided Fisher's exact). This test is NiM3/T2 in Rohmel and Keier (2013). We also provide an exact version of this test with fmecExact
, denoted NiM3/T3 in Rohmel and Keier (2013). When type='switch' the tests are like T1 of Rohmel and Keier (2013).
Usage
fmecTest(x1, n1, x2, n2, threshold = 0.2, delta = 0.1,
alternative = c("less","greater"),
type = c("max", "switch"))
fmecExact(x1, n1, x2, n2, threshold = 0.2, delta = 0.1,
alternative = c("less", "greater"),
type = c("max", "switch"), ngrid = 1000)
Arguments
x1 |
number of failures in control group |
n1 |
number of individuals in control group |
x2 |
number of failures in test group |
n2 |
number of individuals in test group |
threshold |
threshold on proportion in control group: above it use constant difference margin, below it use difference margin with constant odds ratio |
delta |
difference margin at threshold |
alternative |
must be 'less'. the value 'greater' is not supported at this time. |
type |
either 'max' (maximum of Fisher's exact p-value or Farrington and Manning p-value) or 'switch' (Fisher's exact p-value below threhold and Farington and Manning p-value above threhold). |
ngrid |
grid size for the search for the maximum p-value. Search over the control proportion values 0:ngrid/ngrid. |
Details
For details see Rohmel and Keier (2013, Section 3). These functions only use NiM3.
Value
a list of class 'htest':
statistic |
the threshold, delta (difference margin at threshold), and odds ratio at threshold |
data.name |
gives x1,x2,n1,n2 as a character string |
method |
description of test |
p.value |
one-sided p-value |
null.value |
delta, the difference margin at threshold |
alternative |
direction of alternative hypothesis |
Author(s)
Michael P. Fay
References
Farrington, CP and Manning G (1990). "Test statistics and sample size formulae for comparative binomial trials with null hypothesis of non-zero risk difference or non-unit relative risk" Statistics in Medicine 9:1447-1454.
Rohmel, J, and Kieser, M (2013). "Investigations on non-inferiority - - the Food and Drug Administration draft guidance on treatments for nosocomial pneumonia as a case for exact tests for binomial proportions" Statistics in Medicine 32:2335-2348.
See Also
Examples
fmecTest(6,10,2,12,alternative="less",type="max")
fmecExact(6,10,2,12,alternative="less",type="max")