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.4.9 built 2019-12-19 with R 3.6.2.
For an overview of supported designs, methods, and defaults together with some basic examples see
More details and examples in the vignettes accessible via the top-menu and the online manual of all functions.
2x2x2
or short 2x2
.
3x3
and 3x6x3
. Both have the same degrees of freedom (2n–4) in the convential approach and therefore, require the same number of subjects.
sampleN.RatioF()
and for non-inferiority/-superiority in function sampleN.noninf()
, where it is 0.025). In the functions alpha
.
beta0
.
CV
.
CV
.
CV
). If heteroscedasticity is assumed, CV
has to given as a vector with two elements CV = c(x, y)
where CV[1]
is CV_{wT} and CV[2]
is CV_{wR}.
CVb
is required in function sampleN.RatioF()
and in function sampleN.dp()
if design = "IBD"
(incomplete block design).
\(\left[ {L,\,U} \right]=\left[1+log(0.80)/log(rd),\:1+log(1.25)/log(rd) \right]\)
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})\]
targetpower
.
rd
.
robust
logscale = TRUE
) or difference T–R (logscale = FALSE
). In the functions theta0
.
theta1
and theta2
.
theta0 = theta2
or theta0 = theta1
.power.scABEL()
, power.RSABE()
, power.NTIDFDA()
, power.HVNTID()
).
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.
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 3.6.2 (2019-12-12)
# os Windows 10 x64
# system x86_64, mingw32
# ui RTerm
# language en
# collate C
# ctype German_Germany.1252
# tz Europe/Berlin
# date 2019-12-19
#
# - Packages -------------------------------------------------------------------
# package * version date lib source
# AlgDesign 1.2.0 2019-11-29 [2] CRAN (R 3.6.1)
# assertthat 0.2.1 2019-03-21 [2] CRAN (R 3.5.3)
# backports 1.1.5 2019-10-02 [2] CRAN (R 3.6.1)
# callr 3.4.0 2019-12-09 [2] CRAN (R 3.6.1)
# cli 2.0.0 2019-12-09 [2] CRAN (R 3.6.1)
# crayon 1.3.4 2017-09-16 [2] CRAN (R 3.4.2)
# crossdes 1.1-1 2013-03-18 [2] CRAN (R 3.1.1)
# cubature 2.0.4 2019-12-04 [2] CRAN (R 3.6.1)
# desc 1.2.0 2018-05-01 [2] CRAN (R 3.5.0)
# devtools 2.2.1 2019-09-24 [2] CRAN (R 3.6.1)
# digest 0.6.23 2019-11-23 [2] CRAN (R 3.6.1)
# ellipsis 0.3.0 2019-09-20 [2] CRAN (R 3.6.1)
# evaluate 0.14 2019-05-28 [2] CRAN (R 3.6.0)
# fansi 0.4.0 2018-10-05 [2] CRAN (R 3.5.2)
# fs 1.3.1 2019-05-06 [2] CRAN (R 3.6.0)
# glue 1.3.1 2019-03-12 [2] CRAN (R 3.5.3)
# gtools 3.8.1 2018-06-26 [2] CRAN (R 3.5.0)
# htmltools 0.4.0 2019-10-04 [2] CRAN (R 3.6.1)
# knitr 1.26 2019-11-12 [2] CRAN (R 3.6.1)
# magrittr 1.5 2014-11-22 [2] CRAN (R 3.2.0)
# memoise 1.1.0 2017-04-21 [2] CRAN (R 3.4.0)
# mvtnorm 1.0-11 2019-06-19 [2] CRAN (R 3.6.0)
# pkgbuild 1.0.6 2019-10-09 [2] CRAN (R 3.6.1)
# pkgload 1.0.2 2018-10-29 [2] CRAN (R 3.5.2)
# PowerTOST * 1.4-9 2019-12-19 [1] local
# prettyunits 1.0.2 2015-07-13 [2] CRAN (R 3.5.2)
# processx 3.4.1 2019-07-18 [2] CRAN (R 3.6.1)
# ps 1.3.0 2018-12-21 [2] CRAN (R 3.5.2)
# R6 2.4.1 2019-11-12 [2] CRAN (R 3.6.1)
# Rcpp 1.0.3 2019-11-08 [2] CRAN (R 3.6.1)
# remotes 2.1.0 2019-06-24 [2] CRAN (R 3.6.0)
# rlang 0.4.2 2019-11-23 [2] CRAN (R 3.6.1)
# rmarkdown 2.0 2019-12-12 [2] CRAN (R 3.6.2)
# rprojroot 1.3-2 2018-01-03 [2] CRAN (R 3.4.4)
# sessioninfo 1.1.1 2018-11-05 [2] CRAN (R 3.5.2)
# stringi 1.4.3 2019-03-12 [2] CRAN (R 3.5.3)
# stringr 1.4.0 2019-02-10 [2] CRAN (R 3.5.3)
# TeachingDemos 2.10 2016-02-12 [2] CRAN (R 3.3.3)
# testthat 2.3.1 2019-12-01 [2] CRAN (R 3.6.1)
# tufte 0.5 2019-05-12 [2] CRAN (R 3.6.1)
# usethis 1.5.1 2019-07-04 [2] CRAN (R 3.6.1)
# withr 2.1.2 2018-03-15 [2] CRAN (R 3.4.4)
# xfun 0.11 2019-11-12 [2] CRAN (R 3.6.1)
# yaml 2.2.0 2018-07-25 [2] CRAN (R 3.5.2)
#
# [1] C:/Users/Detlew/AppData/Local/Temp/RtmpoTcC02/Rinstaf9c251b5ff0
# [2] C:/Program Files/R/library
# [3] D:/users/detlew/documents/R/win-library/3.6
# [4] C:/Program Files/R/R-3.6.2/library