License: GPL v3 repo active min R first on CRAN cran checks commits last commit CRAN RStudio mirror downloads CRAN RStudio mirror downloads code size repo size closed issues open issues

knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#",
  fig.path = "man/figures/README-"
)
txt <- paste0("Version ", packageVersion("replicateBE"), " built ",
         packageDate("replicateBE", date.fields = "Built"),
         " with R ", substr(packageDescription("replicateBE", fields = "Built"), 3, 7))
if (grepl("900", as.character(packageVersion("replicateBE"))) |
    is.na(packageDate("replicateBE", date.fields = "Date/Publication"))) {
  txt <- paste(txt, "\n(development version not on CRAN).")
} else {
  txt <- paste0(txt, "\n(stable release on CRAN ",
           packageDate("replicateBE", date.fields = "Date/Publication"), ").")
}
cat(txt)

Comparative BA-calculation for the EMA’s Average Bioequivalence with Expanding Limits (ABEL)

Introduction{#introduction}

The package provides data sets (internal .rda and in CSV-format in /extdata/) supporting users in a black-box performance qualification (PQ) of their software installations. Users can analyze own data imported from CSV- and Excel-files (in xlsx or the legacy xls format). The methods given by the EMA for reference-scaling of HVD(P)s, i.e., Average Bioequivalence with Expanding Limits (ABEL)1,2 are implemented.
Potential influence of outliers on the variability of the reference can be assessed by box plots of studentized and standardized residuals as suggested at a joint EGA/EMA workshop.3
Health Canada’s approach4 requiring a mixed-effects model is approximated by intra-subject contrasts.
Direct widening of the acceptance range as recommended by the Gulf Cooperation Council5 (Bahrain, Kuwait, Oman, Qatar, Saudi Arabia, United Arab Emirates) is provided as well.
In full replicate designs the variability of test and reference treatments can be assessed by s~wT~/s~wR~ and the upper confidence limit of σ~wT~/σ~wR~. This was required in a pilot phase by the WHO but lifted in 2021; reference-scaling of AUC is acceptable if the protocol is submitted to the PQT/MED.6

TOC ↩

Methods{#methods}

Estimation of CV~wR~ (and CV~wT~ in full replicate designs){#estimation-of-cvwr-and-cvwt-in-full-replicate-designs}

Called internally by functions method.A() and method.B(). A linear model of log-transformed pharmacokinetic (PK) responses and effects
sequence, subject(sequence), period\ where all effects are fixed (i.e., by an ANOVA). Estimated by the function lm() of package stats.

modCVwR <- lm(log(PK) ~ sequence + subject %in% sequence + period,
                        data = data[data$treatment == "R", ])
modCVwT <- lm(log(PK) ~ sequence + subject %in% sequence + period,
                        data = data[data$treatment == "T", ])

TOC ↩

Method A{#method-a}

Called by function method.A(). A linear model of log-transformed PK responses and effects
sequence, subject(sequence), period, treatment\ where all effects are fixed (e.g., by an ANOVA). Estimated by the function lm() of package stats.

modA <- lm(log(PK) ~ sequence + subject %in% sequence + period + treatment,
                     data = data)

TOC ↩

Method B{#method-b}

Called by function method.B(). A linear model of log-transformed PK responses and effects
sequence, subject(sequence), period, treatment\ where subject(sequence) is a random effect and all others are fixed.
Three options are provided:

modB <- lmer(log(PK) ~ sequence + period + treatment + (1|subject),
                       data = data)
modB <- lme(log(PK) ~ sequence +  period + treatment, random = ~1|subject,
                      data = data)
modB <- lmer(log(PK) ~ sequence + period + treatment + (1|subject),
                       data = data)

TOC ↩

Average Bioequivalence{#average-bioequivalence}

Called by function ABE(). The model is identical to Method A. Conventional BE limits (80.00 – 125.00\%) are employed by default. Tighter limits (90.00 – 111.11\%) for narrow therapeutic index drugs (EMA and others) or wider limits (75.00 – 133.33\%) for C~max~ according to the guideline of South Africa7 can be specified.

TOC ↩

Tested designs{#tested-designs}

Four period (full) replicates{#four-period-full-replicates}

TRTR | RTRT
TRRT | RTTR
TTRR | RRTT
TRTR | RTRT | TRRT | RTTR
TRRT | RTTR | TTRR | RRTT

Three period (full) replicates{#three-period-full-replicates}

TRT | RTR
TRR | RTT

Two period (full) replicate{#two-period-full-replicate}

TR | RT | TT | RR (Balaam’s design; not recommended due to poor power characteristics)

Three period (partial) replicates{#three-period-partial-replicates}

TRR | RTR | RRT
TRR | RTR (Extra-reference design; biased in the presence of period effects, not recommended)

TOC ↩

Cross-validation{#cross-validation}

Details about the reference datasets:

help("data", package = "replicateBE")
?replicateBE::data

Results of the 30 reference datasets agree with ones obtained in SAS (v9.4), Phoenix WinNonlin (v6.4 – v8.3.4.295), STATISTICA (v13), SPSS (v22.0), Stata (v15.0), and JMP (v10.0.2).8

TOC ↩

Examples{#examples}

library(replicateBE) # attach the package
res <- method.A(verbose = TRUE, details = TRUE,
                print = FALSE, data = rds01)
cols <- c(12, 17:21)           # extract relevant columns
# cosmetics: 2 decimal places acc. to the GL
tmp  <- data.frame(as.list(sprintf("%.2f", res[cols])))
names(tmp) <- names(res)[cols]
tmp  <- cbind(tmp, res[22:24]) # pass|fail
print(tmp, row.names = FALSE)

TOC ↩

res  <- method.B(option = 1, verbose = TRUE, details = TRUE,
                 print = FALSE, data = rds01)
cols <- c(12, 17:21)
tmp  <- data.frame(as.list(sprintf("%.2f", res[cols])))
names(tmp) <- names(res)[cols]
tmp  <- cbind(tmp, res[22:24])
print(tmp, row.names = FALSE)

TOC ↩

res  <- method.B(option = 3, ola = TRUE, verbose = TRUE,
                 details = TRUE, print = FALSE, data = rds01)
cols <- c(27, 31:32, 19:21)
tmp  <- data.frame(as.list(sprintf("%.2f", res[cols])))
names(tmp) <- names(res)[cols]
tmp  <- cbind(tmp, res[22:24])
print(tmp, row.names = FALSE)

TOC ↩

res <- method.A(regulator = "GCC", details = TRUE,
                print = FALSE, data = rds01)
cols <- c(12, 17:21)
tmp  <- data.frame(as.list(sprintf("%.2f", res[cols])))
names(tmp) <- names(res)[cols]
tmp  <- cbind(tmp, res[22:24])
print(tmp, row.names = FALSE)

TOC ↩

res <- ABE(theta1 = 0.75, details = TRUE,
           print = FALSE, data = rds01)
tmp <- data.frame(as.list(sprintf("%.2f", res[12:17])))
names(tmp) <- names(res)[12:17]
tmp <- cbind(tmp, res[18])
print(tmp, row.names = FALSE)

TOC ↩

res <- ABE(theta1 = 0.90, details = TRUE,
           print = FALSE, data = rds05)
cols <- c(13:17)
tmp  <- data.frame(as.list(sprintf("%.2f", res[cols])))
names(tmp) <- names(res)[cols]
tmp  <- cbind(tmp, res[18])
print(tmp, row.names = FALSE)

TOC ↩

Installation{#installation}

The package requires R ≥3.5.0. However, for the Kenward-Roger approximation method.B(..., option = 3) R ≥3.6.0 is required.

install.packages("replicateBE", repos = "https://cloud.r-project.org/")
install.packages("devtools", repos = "https://cloud.r-project.org/")
devtools::install_github("Helmut01/replicateBE")

TOC ↩

Session Information{#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 = 66)
print(sessionInfo(), locale = FALSE)

TOC ↩

Contributors{#contributors}

Helmut Schütz (author) ORCID iD
Michael Tomashevskiy (contributor)
Detlew Labes (contributor) ORCID iD

TOC ↩

Disclaimer{#disclaimer}

Package offered for Use without any Guarantees and Absolutely No Warranty. No Liability is accepted for any Loss and Risk to Public Health Resulting from Use of this R-Code.

TOC ↩


  1. EMA. EMA/582648/2016. Annex I. London. 21 September 2016. Online \   2. EMA, CHMP. CPMP/EWP/QWP/1401/98 Rev. 1/ Corr **. London. 20 January 2010. Online. \   3. EGA. Revised EMA Bioequivalence Guideline. Questions & Answers. London. June 2010. Online \   4. Health Canada. Guidance Document. Conduct and Analysis of Comparative Bioavailability Studies. Ottawa. 2018/06/08. Online. \   5. Executive Board of the Health Ministers’ Council for GCC States. The GCC Guidelines for Bioequivalence. Version 3.0. May 2021. Online. \   6. WHO. Application of reference-scaled criteria for AUC in bioequivalence studies conducted for submission to PQT/MED. Geneva. 02 July 2021. Online. \   7. MCC. Registration of Medicines. Biostudies. Pretoria. June 2015. Online. \   8. Schütz H, Tomashevskiy M, Labes D, Shitova A, González-de la Parra M, Fuglsang A. Reference Datasets for Studies in a Replicate Design Intended for Average Bioequivalence with Expanding Limits. AAPS J. 2020; 22(2): Article 44. doi:10.1208/s12248-020-0427-6. \   9. EMA. EMA/582648/2016. Annex II. London. 21  September 2016. Online. \ 10. Shumaker RC, Metzler CM. The Phenytoin Trial is a Case Study of ‘Individual’ Bioequivalence. Drug Inf J. 1998; 32(4): 1063--72. doi:10.1177/009286159803200426.



Helmut01/replicateBE documentation built on May 9, 2022, 12:15 a.m.