mcnby_ni {EQUIVNONINF} | R Documentation |
Bayesian test for noninferiority in the McNemar setting with the difference of proportions as the parameter of interest
Description
The program determines through iteration the largest nominal
level \alpha_0
such that comparing the posterior probability
of the alternative hypothesis K_1: \delta > -\delta_0
to the lower
bound 1-\alpha_0
generates a critical region whose size does not exceed
the target significance level \alpha
. In addition, exact values of the
power against specific parameter configurations with \delta = 0
are output.
Usage
mcnby_ni(N,DEL0,K1,K2,K3,NSUB,SW,ALPHA,MAXH)
Arguments
N |
sample size |
DEL0 |
noninferiority margin to the difference of the parameters of the marginal binomial distributions under comparison |
K1 |
Parameter 1 of the Dirichlet prior for the family of trinomial distributions |
K2 |
Parameter 2 of the Dirichlet prior for the family of trinomial distributions |
K3 |
Parameter 3 of the Dirichlet prior for the family of trinomial distributions |
NSUB |
number of subintervals for partitioning the range of integration |
SW |
width of the search grid for determining the maximum of the rejection probability on the common boundary of the hypotheses |
ALPHA |
target significance level |
MAXH |
maximum number of interval halving steps to be carried out in finding the maximally raised nominal level |
Details
The program uses 96-point Gauss-Legendre quadrature on each of the NSUB intervals into which the range of integration is partitioned.
Value
N |
sample size |
DEL0 |
noninferiority margin to the difference of the parameters of the marginal binomial distributions under comparison |
K1 |
Parameter 1 of the Dirichlet prior for the family of trinomial distributions |
K2 |
Parameter 2 of the Dirichlet prior for the family of trinomial distributions |
K3 |
Parameter 3 of the Dirichlet prior for the family of trinomial distributions |
NSUB |
number of subintervals for partitioning the range of integration |
SW |
width of the search grid for determining the maximum of the rejection probability on the common boundary of the hypotheses |
ALPHA |
target significance level |
MAXH |
maximum number of interval halving steps to be carried out in finding the maximally raised nominal level |
ALPHA0 |
result of the search for the largest admissible nominal level |
SIZE0 |
size of the critical region corresponding to |
SIZE_UNC |
size of the critical region of test at uncorrected nominal level |
POW |
power against 7 different parameter configurations with |
Author(s)
Stefan Wellek <stefan.wellek@zi-mannheim.de>
Peter Ziegler <peter.ziegler@zi-mannheim.de>
References
Wellek S: Testing statistical hypotheses of equivalence and
noninferiority. Second edition. Boca Raton:
Chapman & Hall/CRC Press, 2010, \S
5.2.3.
Examples
mcnby_ni(25,.10,.5,.5,.5,10,.05,.05,5)