A variable margin difference in proportion test for non-inferiority. The test is based on Barnard's test.
brkTest(x1, n1, x2, n2, threshold = 0.2, delta = 0.1, control = brkControl())
a list of class brk
, with elements:
the threshold, delta (difference margin at threshold), and odds ratio at threshold
gives x1,x2,n1,n2 as a character string
description of test
one-sided p-value
a list with 4 matrices, each n1+1 by n2+1 representing the total sample space. R=a matrix with logical values with TRUE elements representing the rejection region, its 'sig.level' attribute gives the significance level of the test; PVALbounds=a matrix of p-value bounds, pb; PVALsymbols=a matrix of symbols that describe the pb, '<=' means 'p<=pb', '=' means 'p=pb' and '>' means 'p>pb'; PVALUES=a matrix giving the p-value expression, e.g., 'p<=.00321' or 'p>0.025'.
number of events in the control group
number of individuals in the control group
number of events in the test group
number of events in the test group
proportion in the control group associated with the threshold, above that threshold use a constant difference margin, below the threshold use a difference margin with a constant odds ratio. We use only continuous variable margins that meet at the threshold.
difference in proportions at the threshold
list of parameters for algorithm control, see brkControl
Michael P. Fay
This test is labeled T4 in Rohmel and Keiser (2013).
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 nicqTest
, ~~~
x<-brkTest(3,8,0,6)
x
x$FullResults$PVALUES
Run the code above in your browser using DataLab