brkTest: Barnard-Rohmel-Kieser Test

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/RKFunctions.R

Description

A variable margin difference in proportion test for non-inferiority. The test is based on Barnard's test.

Usage

1
brkTest(x1, n1, x2, n2, threshold = 0.2, delta = 0.1, control = brkControl())

Arguments

x1

number of events in the control group

n1

number of individuals in the control group

x2

number of events in the test group

n2

number of events in the test group

threshold

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.

delta

difference in proportions at the threshold

control

list of parameters for algorithm control, see brkControl

Details

This test is labeled T4 in Rohmel and Keiser (2013).

Value

a list of class brk, with elements:

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

FullResults

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'.

Author(s)

Michael P. Fay

References

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

See Also nicqTest, ~~~

Examples

1
2
3
x<-brkTest(3,8,0,6)
x
x$FullResults$PVALUES

Example output

Loading required package: bpcp
Loading required package: ssanv

	Barnard-Rohmel-Kieser Test

data:  x1=3 n1=8 x2=0 n2=6
threshold = 0.2000, difference = 0.1000, odds ratio = 1.7143

One-sided p-value:
p>0.025
Note: to save computational time, only bound on p-value calculated.

For rejection region and p-values for any possible
result with these sample sizes, save output as x,
and see the list x$FullResults
     x2=0          x2=1          x2=2         x2=3         x2=4        
x1=0 "p>0.025"     "p>0.025"     "p>0.025"    "p>0.025"    "p>0.025"   
x1=1 "p>0.025"     "p>0.025"     "p>0.025"    "p>0.025"    "p>0.025"   
x1=2 "p>0.025"     "p>0.025"     "p>0.025"    "p>0.025"    "p>0.025"   
x1=3 "p>0.025"     "p>0.025"     "p>0.025"    "p>0.025"    "p>0.025"   
x1=4 "p=0.011699"  "p>0.025"     "p>0.025"    "p>0.025"    "p>0.025"   
x1=5 "p=0.003668"  "p>0.025"     "p>0.025"    "p>0.025"    "p>0.025"   
x1=6 "p=0.000852"  "p=0.008467"  "p>0.025"    "p>0.025"    "p>0.025"   
x1=7 "p<=0.000293" "p=0.002501"  "p=0.013915" "p>0.025"    "p>0.025"   
x1=8 "p<=0.000293" "p<=0.000293" "p=0.001404" "p=0.006229" "p=0.024348"
     x2=5      x2=6     
x1=0 "p>0.025" "p>0.025"
x1=1 "p>0.025" "p>0.025"
x1=2 "p>0.025" "p>0.025"
x1=3 "p>0.025" "p>0.025"
x1=4 "p>0.025" "p>0.025"
x1=5 "p>0.025" "p>0.025"
x1=6 "p>0.025" "p>0.025"
x1=7 "p>0.025" "p>0.025"
x1=8 "p>0.025" "p>0.025"

nivm documentation built on May 2, 2019, 8:22 a.m.