Calculates the exact type I error rate of two simultaneous TOST procedures (where the two parameters of the two TOSTs are correlated with some correlation) for various study designs used in BE studies
type1error.2TOST(alpha = c(0.05, 0.05), logscale = TRUE, theta1, theta2,
CV, n, rho, design = "2x2", robust = FALSE, setseed = TRUE,
details = FALSE)
Vector; contains one-sided significance level for each of the two TOSTs. For one TOST, by convention mostly set to 0.05.
Should the data used on log-transformed or on original scale? TRUE or FALSE. Defaults to TRUE.
Vector; contains lower bioequivalence limit for each of the two TOSTs.
In case of logscale=TRUE
it is given as ratio, otherwise as diff. to 1.
Defaults to c(0.8, 0.8)
if logscale=TRUE
or to c(-0.2, -0.2)
if logscale=FALSE
.
Vector; contains upper bioequivalence limit for each of the two TOSTS.
If not given theta2 will be calculated as 1/theta1
if logscale=TRUE
or as -theta1
if logscale=FALSE
.
Vector of coefficient of variations (given as as ratio, e.g. 0.2 for 20%).
In case of cross-over studies this is the within-subject CV,
in case of a parallel-group design the CV of the total variability.
In case of logscale=FALSE
CV is assumed to be the respective standard
deviation.
Number of subjects under study. Is total number if given as scalar, else number of subjects in the (sequence) groups. In the latter case the length of n vector has to be equal to the number of (sequence) groups.
Correlation between the two parameters under consideration. This is defined as correlation between the estimator of the treatment difference of parameter one and the estimator of the treatment difference of parameter two.
Character string describing the study design.
See known.designs()
for designs covered in this package.
Defaults to FALSE. With that value the usual degrees of freedom will be used.
Set to TRUE
will use the degrees of freedom according to the 'robust'
evaluation (aka Senn's basic estimator). These df are calculated as n-seq
.
See known.designs()$df2
for designs covered in this package.
Has only effect for higher-order crossover designs.
Calculation depends on pmvt()
which is based on randomized quasi Monte Carlo
methods. If setseed=TRUE
a seed value is set, the default.
logical; if TRUE, P(Type I error) will be returned for all eight intersection null sets, otherwise the maximum (default).
Value of Type I Error rate if argument details = FALSE
.
A data.frame with the TIE for each of the eight nullhypothesis regions if
details = TRUE
.
The exact calculations of the type 1 error rate are performed via integration of
the 4-dimensional non-central t-distribution via function pmvt()
of package
mvtnorm
. An absolute error tolerance of 1e-05 is set within pmvt()
.
The formulas cover balanced and unbalanced studies w.r.t (sequence) groups.
In case of parallel group design and higher order crossover designs
(replicate crossover or crossover with more than two treatments) the calculations
are based on the assumption of equal variances for Test and Reference products
under consideration.
The formulas for the paired means 'design' do not take an additional correlation
parameter into account. They are solely based on the paired t-test
(TOST of differences = zero).
Hua SY, Xu S, D'Agostino RB Sr. Multiplicity adjustments in testing for bioequivalence Stat Med. 2015;34(2):215--31. 10.1002/sim.6247
Lang B, Fleischer F. Letter to the Editor: Comments on 'Multiplicity adjustments in testing for bioequivalence' Stat Med. 2016;35(14):2479--80. 10.1002/sim.6488
# NOT RUN {
# Replicate type 1 error rate for scenario S2 from Hua et al.
# runs 6-7 seconds, more than allowed for examples on CRAN
n <- 24
cv <- se2CV(c(0.0490 / sqrt(2/n), 0.0657 / sqrt(2/n)))
type1error.2TOST(CV = cv, n = n, rho = 0.6794, details = FALSE)
# }
Run the code above in your browser using DataLab