PowerTOST • Main Vignette

 

Introduction

The package contains functions to calculate power and estimate sample size for various study designs used in (not only bio-) equivalence studies. Power and sample size can be obtained based on different methods, amongst them prominently the TOST procedure (two one-sided t-tests).
Version 1.5.0 built 2020-08-04 with R 4.0.2.

For an overview of supported designs, methods, and defaults together with some basic examples see

Details and examples are accessible via the menu bar on top of the page and in the
online manual of all functions.

Abbreviations, Definition of Terms, Models

2×2×2
Crossover design with 2 treatments, 2 sequences, and 2 periods. In the literature also TR | RT or AB | AB. In the functions 2x2x2 or short 2x2.
2x2x3, 2x2x4
Full replicate designs with 2 treatments, 2 sequences, and 3 or 4 periods. Both T and R are administered twice to ½ of the subjects.
2×3×3
Partial (or semi-) replicate design with 2 treatments, 3 sequences, and 3 periods. R is administered to all subjects twice and T once. Popular (though not optimal) is TRR|RTR|RRT.
2×4×2
Full replicate design with 2 treatments, 4 sequences, and 2 periods (Balaam’s design). TR|RT|TT|RR; not optimal due to poor power characteristics.
2×4×4
Full replicate designs with 2 treatments, 4 sequences, and 4 periods (TRTR|RTRT|TRRT|RTTR or TRTR|RTRT|TTRR|RRTT). This design should be avoided due to confounding.
3×3, 3×6×3
Higher-order crossover designs with 3 treatments, 3 or 6 sequences, and 3 periods (Latin Square or a Williams’ design). In the functions 3x3 and 3x6x3. Both have the same degrees of freedom (2n–4) in the convential approach and therefore, require the same number of subjects.
4×4
Higher-order crossover design with 4 treatments, 4 sequences, and 4 periods (Latin Square or a Williams’ design).
ABE
Average Bioequivalence with fixed limits based on a clinically not relevant difference \(\Delta\). The common \(\Delta\) 0.20 leads to \(\theta_1=1-\Delta,\:\theta_2=1/(1-\Delta)\) or 80.00–125.00%. For NTIDs (EMA and other jurisdicions) \(\Delta\) 0.10 (90.00–111.11%). For Cmax (Russian Federation, EEU, GCC) \(\Delta\) 0.25 (75.00–133.33%).\[H_0:\mu_T/\mu_R\notin \left [ \theta_1,\theta_2 \right ]\:vs\:H_1:\theta_1<\mu_T/\mu_R<\theta_2\]
ABEL
Average Bioequivalence with expanding limits (see also L, U). Same model like for ABE but \(\theta_1,\theta_2\) are based on the CVwR observed in the study.
\(\alpha\)
Nominal level of the test. In tests for equivalence commonly 0.05 (except for the ratio of two means with normality on original scale based on Fieller’s (‘fiducial’) confidence interval in function sampleN.RatioF() and for non-inferiority/-superiority in function sampleN.noninf(), where it is 0.025). In the functions alpha.
\(\beta\)
Probability that the Null-hypothesis of inequivalence is falsely not rejected. Also the type II error or producer’s risk, where \(\beta=1-\pi\).
\(\beta_0\)
Assumed or true slope of the (linearized) power model of dose-proportionality \(x=\alpha\cdot dose^\beta,\:log(x)=\alpha+\beta\cdot log(dose)\). Argument beta0.
CV
Coefficient of variation
Calculated from the residual error of the model of log-transformed data as \(CV=\sqrt{e^{\sigma^2}+1}\).
  • In crossover designs the intra- (between-) subject CV. Argument CV.
  • In parallel designs the total (pooled) CV. Argument CV.
  • In replicate designs the intra-subject CV (assuming homoscedasticity, argument CV). If heteroscedasticity is assumed, CV has to given as a vector with two elements CV = c(x, y) where CV[1] is CVwT and CV[2] is CVwR.
CVb
Inter- (between-) subject coefficient of variation. Argument CVb is required in function sampleN.RatioF() and in function sampleN.dp() if design = "IBD" (incomplete block design).
CVcap
Upper cap in ABEL. If CVwR > CVcap, expanding is based on CVcap (and not on CVwR). In all jurisdictions 50%, except for Health Canada where CVcap ≈57.4%.
CVswitch
Switching coefficient of variation in reference-scaling. Only above this value reference-scaling is acceptable. For highly variable drugs / drug products 30% (CV0 0.30, s0 0.294).
\(\Delta\)
Clinically not relevant difference. Commonly 0.20. For NTIDs (EMA and other jurisdicions) \(\Delta\) 0.10, for Cmax (Russian Federation, EEU, GCC) \(\Delta\) 0.25.
HVD(P)
Highly variable drug (product); commonly defined with an intra-subject CV of ≥30%. HVDs exhibit highly variable clearances (CV ≥30% if administered as a solution), whereas HVDPs may additionally – or solely – show highly variable absorption. HVDP(s) generally are ones with a flat dose-response curve.
k
Regulatory constant (also \(\theta_s\))

ABEL: Based on the switching coefficient of variation \(CV_0=30\%\). \(k=log(1.25)/\sqrt{log(CV_{0}^{2}+1)}\approx 0.760\).

RSABE: Based on the switching standard deviation \(s_0=0.25\). \(k=log(1.25)/0.25\approx 0.8926\).
L, U
ABEL, RSABE
ABEL: Lower and upper expanded limits.
  • 30% < CVwR ≤ 50%: Based on \(s_{wR}\). \(\left[ {L,\,U} \right] = 100{e^{ \mp 0.760 \cdot {s_{wR}}}}\)
  • CVwR > CVcap: Applying \(s^*_{wR}=\sqrt{log(CV_{cap}^{2}+1)}\) in the expansion formula: \(\left[ {L,\,U} \right] = {69.84 - 143.19\%}\). All jurisdictions except Health Canada, where \(\left[ {L,\,U} \right] = {66.7 - 150.0\%}\).
RSABE: Lower and upper ‘implied limits’.
  • If \(s_{wR}\geq 0.294\): \(\left[ {L,\: U} \right] = 100{e^{ \mp 0.8926 \cdot {s_{wR}}}}\)
Dose-Proportionality

\(\left[ {L,\,U} \right]=\left[1+log(0.80)/log(rd),\:1+log(1.25)/log(rd) \right]\)

margin
Non-inferiority/-superiority margin (example for logscale = TRUE where \(\theta_0=\mu_T/\mu_R\)).

Non-inferiority: If margin < 1, higher responses are are assumed to be better. \[H_0:\,\theta_0 \leq \log({margin})\:vs\:H_1:\,\theta_0>\log({margin})\]

Non-superiority: If margin > 1, lower responses are are assumed to be better. \[H_0:\,\theta_0 \geq \log({margin})\:vs\:H_1:\,\theta_0<\log({margin})\]
n
(Total) number of subjects.
nseq
Number of sequences.
NTID
Narrow therapeutic index drug, i.e., with a steep dose-response curve.
\(\pi\)
Target (or desired) power in study planning. Commonly set to 0.80–0.90. In the functions targetpower.
R
Reference (treatment, product).
rd
Ratio of the highest/lowest dose. In the functions rd.
robust
Selects degrees of freedom according to Senn’s basic estimator, where nnseq.
RSABE
Reference-scaled Average Bioequivalence (U.S. FDA, China NMPA-CDE). Applicable if the intra-subject variability of the reference treatment swR ≥0.294 (CVwR ≈ 30%). The linearized model is \[H_0:(\mu_T/\mu_R)^2-\theta_{s}^{2}\cdot s_{wR}^{2}>0\:vs\:H_1:(\mu_T/\mu_R)^2-\theta_{s}^{2}\cdot s_{wR}^{2}\leq 0\] See also ABEL.
\(\theta_0\)
Assumed or true T/R-ratio (logscale = TRUE) or difference T–R (logscale = FALSE). In the functions theta0.
\(\theta_1,\theta_2\)
Lower and upper limits of the equivalence range. In the functions theta1 and theta2.
\(\theta_s\)
Regulatory constant in reference-scaling (see also k).
T
Test (treatment, product).
TIE (type I error)
Probability that the Null-hypothesis of inequivalence is falsely rejected (i.e., equivalence is concluded). Also the patient’s risk. Can be assessed with the power-functions setting theta0 = theta2 or theta0 = theta1.
Exact, except in reference-scaling based on simulations (power.scABEL(), power.RSABE(), power.NTIDFDA(), power.HVNTID()).

Installation

You can install the released version of PowerTOST from CRAN with …

package <- "PowerTOST"
inst    <- package %in% installed.packages()
if (length(package[!inst]) > 0) install.packages(package[!inst])

… and the development version from GitHub with

# install.packages("remotes")
remotes::install_github("Detlew/PowerTOST")

Skips installation from a github remote if the SHA-1 has not changed since last install. Use force = TRUE to force installation.

Contributors

Session Information

Inspect this information for reproducibility. Of particular importance are the versions of R and the packages used to create this workflow. It is considered good practice to record this information with every analysis.

options(width = 80)
devtools::session_info()
# - Session info ---------------------------------------------------------------
#  setting  value                       
#  version  R version 4.0.2 (2020-06-22)
#  os       Windows 10 x64              
#  system   x86_64, mingw32             
#  ui       RTerm                       
#  language EN                          
#  collate  C                           
#  ctype    German_Germany.1252         
#  tz       Europe/Berlin               
#  date     2020-08-04                  
# 
# - Packages -------------------------------------------------------------------
#  package       * version date       lib source        
#  AlgDesign       1.2.0   2019-11-29 [2] CRAN (R 4.0.0)
#  assertthat      0.2.1   2019-03-21 [2] CRAN (R 4.0.0)
#  backports       1.1.7   2020-05-13 [2] CRAN (R 4.0.0)
#  callr           3.4.3   2020-03-28 [2] CRAN (R 4.0.0)
#  cli             2.0.2   2020-02-28 [2] CRAN (R 4.0.0)
#  crayon          1.3.4   2017-09-16 [2] CRAN (R 4.0.0)
#  crossdes        1.1-1   2013-03-18 [2] CRAN (R 4.0.0)
#  cubature        2.0.4.1 2020-07-06 [2] CRAN (R 4.0.2)
#  desc            1.2.0   2018-05-01 [2] CRAN (R 4.0.0)
#  devtools        2.3.0   2020-04-10 [2] CRAN (R 4.0.0)
#  digest          0.6.25  2020-02-23 [2] CRAN (R 4.0.0)
#  ellipsis        0.3.1   2020-05-15 [2] CRAN (R 4.0.0)
#  evaluate        0.14    2019-05-28 [2] CRAN (R 4.0.0)
#  fansi           0.4.1   2020-01-08 [2] CRAN (R 4.0.0)
#  fs              1.4.2   2020-06-30 [2] CRAN (R 4.0.2)
#  glue            1.4.1   2020-05-13 [2] CRAN (R 4.0.0)
#  gtools          3.8.2   2020-03-31 [2] CRAN (R 4.0.0)
#  htmltools       0.5.0   2020-06-16 [2] CRAN (R 4.0.0)
#  knitr           1.29    2020-06-23 [2] CRAN (R 4.0.2)
#  magrittr        1.5     2014-11-22 [2] CRAN (R 4.0.0)
#  memoise         1.1.0   2017-04-21 [2] CRAN (R 4.0.0)
#  mvtnorm         1.1-1   2020-06-09 [2] CRAN (R 4.0.0)
#  pkgbuild        1.0.8   2020-05-07 [2] CRAN (R 4.0.0)
#  pkgload         1.1.0   2020-05-29 [2] CRAN (R 4.0.0)
#  PowerTOST     * 1.5-0   2020-08-04 [1] local         
#  prettyunits     1.1.1   2020-01-24 [2] CRAN (R 4.0.0)
#  processx        3.4.3   2020-07-05 [2] CRAN (R 4.0.2)
#  ps              1.3.3   2020-05-08 [2] CRAN (R 4.0.0)
#  R6              2.4.1   2019-11-12 [2] CRAN (R 4.0.0)
#  Rcpp            1.0.4.6 2020-04-09 [2] CRAN (R 4.0.2)
#  remotes         2.1.1   2020-02-15 [2] CRAN (R 4.0.0)
#  rlang           0.4.6   2020-05-02 [2] CRAN (R 4.0.0)
#  rmarkdown       2.3     2020-06-18 [2] CRAN (R 4.0.0)
#  rprojroot       1.3-2   2018-01-03 [2] CRAN (R 4.0.0)
#  sessioninfo     1.1.1   2018-11-05 [2] CRAN (R 4.0.0)
#  stringi         1.4.6   2020-02-17 [2] CRAN (R 4.0.0)
#  stringr         1.4.0   2019-02-10 [2] CRAN (R 4.0.0)
#  TeachingDemos   2.12    2020-04-07 [2] CRAN (R 4.0.0)
#  testthat        2.3.2   2020-03-02 [2] CRAN (R 4.0.0)
#  tufte           0.6     2020-05-08 [2] CRAN (R 4.0.0)
#  usethis         1.6.1   2020-04-29 [2] CRAN (R 4.0.0)
#  withr           2.2.0   2020-04-20 [2] CRAN (R 4.0.0)
#  xfun            0.15    2020-06-21 [2] CRAN (R 4.0.2)
#  yaml            2.2.1   2020-02-01 [2] CRAN (R 4.0.0)
# 
# [1] C:/Users/Detlew/AppData/Local/Temp/Rtmpctfl0c/Rinst77a5848c32d89
# [2] C:/Program Files/R/library
# [3] C:/Program Files/R/R-4.0.2/library

License

Helmut Schütz 2020-08-04

GPL-2 | GPL-3