Learn R Programming

replicateBE (version 1.1.3)

method.A: Comparative BA-calculation for Average Bioequivalence with Expanding Limits by the EMA's 'Method A'

Description

This function performs the required calculations for the mixed (or aggregate) BE decision via Average Bioequivalence with Expanding Limits (ABEL) based on ANOVA (‘Method A’) as recommended in Annex I.

Usage

method.A(alpha = 0.05, path.in, path.out = tempdir(), file, set = "",
         ext, na = ".", sep = ",", dec = ".", logtrans = TRUE,
         regulator = "EMA", ola = FALSE, print = TRUE, details = FALSE,
         adjust = FALSE, verbose = FALSE, ask = FALSE,
         plot.bxp = FALSE, fence = 2, data = NULL)

Arguments

alpha

Type I Error (TIE) probability (nominal level of the test). Conventionally set to 0.05, resulting in a confidence interval.

path.in

Path to the data file for import.

path.out

Path to save the result file if print=TRUE. You must have write-permission to the folder. For simplicity your home folder "~/" can be used. If missing, R<U+2019>s standard temporary folder will be used. If a box plot of outliers should be saved (plot.bxp = TRUE), this path will be used as well.

file

Name of the dataset for import (without extension). Must be a string (i.e., enclosed in single or double quotation marks).

set

Name of the sheet of an Excel-file (mandatory). Must be a string (i.e., enclosed in single or double quotation marks).

ext

File-extension enclosed in single or double quotation marks. Acceptable are "csv" for character delimited variables (CSV) or "xls", "xlsx" for Excel-files. The file-extension is not case-sensitive.

na

Character string denoting missing values. Acceptable are "NA" (not available), "ND" (not determined), "." (SAS), "Missing" (Phoenix WinNonlin), and "" (Excel; empty cell). Missings will be converted to NA in the imported data. Defaults to ".".

sep

Variable separator in the CSV-file. Acceptable are "," (comma = ASCII 44), ";" (semicolon = ASCII 59), and "\t" (tabulator = ASCII 9). Defaults to ",".

dec

Decimal separator in the CSV-file. Acceptable are "." (period = ASCII 46) or "," (comma = ASCII 44). Defaults to ".".

logtrans

If TRUE (default) the raw data (provided in column PK) will be internally log-transformed and used in the calculations. If FALSE the already log-transformed data (provided in the column logPK) will be used in the calculations.

regulator

Set regulatory conditions. If "EMA" (default) conventional ABEL will be used. If "GCC" direct widening to 75.00--133.33% will be used if CVwR > 30%.

ola

Defaults to FALSE. If TRUE an outlier analysis based on the studentized and standardized (aka internally studentized) residuals of the model estimating CVwR is performed.

print

If TRUE (default), the function prints its results to a file. If FALSE, returns a data frame of results.

details

Defaults to FALSE. If TRUE, the function sends its results in full precision to a data frame.

adjust

Defaults to FALSE. If TRUE, the empiric Type I Error (TIE) is evaluated via simulations (by the function scABEL.ad of library PowerTOST). Currently implemented designs are 2x2x4, 2x2x3, and 2x3x3. If the TIE exceeds the nominal level of the test alpha, is iteratively adjusted until . If ola = TRUE and outlier(s) found<U+00A0>-- which lead to an always lower -- recalculated CVwR, the assessment is repeated for its value.

verbose

Defaults to FALSE. If TRUE the ANOVA-table is send to the console. If ola = TRUE additional information about outliers are shown.

ask

Defaults to FALSE. If TRUE the user will be asked whether an already existing result file (and if outliers are found, the box plot) should be overwritten.

plot.bxp

Only observed if ola = TRUE and at least one outlier is found. If FALSE (default) the box plot will be shown in the graphics device. If TRUE the box plot will be saved in PNG format to path.out.

fence

Only observed if ola = TRUE. The limit for outlier detection as a multiplier of the interquartile range. Defaults to 2. Less outliers will be detected with higher values (not recommended).

data

Specification of one of the internal reference datasets (rds01 to rds30). If given, the arguments path.in, file, set, and ext are ignored. For its use see the examples. If not given, defaults to NULL (i.e., import data from a file).

Value

Prints results to a file if argument print = TRUE (default). If argument print = FALSE, returns a data frame with the elements:

Design e.g., TRTR|RTRT
Method A
n total number of subjects
nTT number of subjects with two treatments of T (full replicates only)
nRR number of subjects with two treatments of R
Sub/seq number of subjects per sequence
Miss/seq if the design is unbalanced, number of missings per sequence
Miss/per if the design is incomplete, number of missings per period
alpha nominal level of the test
DF degrees of freedom of the treatment comparison
CVwT(%) intra-subject coefficient of variation of the test treatment (full replicates only)
CVwR(%) intra-subject coefficient of variation of the reference treatment
swT intra-subject standard deviation of the test treatment (full replicates only)
swR intra-subject standard deviation of the reference treatment
sw.ratio ratio of intra-subject deviations of T and R (full replicates only)
  • If reference-scaling is applicable (i.e., CVwR(%) >30%):

    L(%) lower expanded limit of the acceptance range (AR)

  • If reference-scaling is not applicable (i.e., CVwR(%) 30%):

    BE.lo(%) lower limit of the conventional AR ( 80)

CL.lo(%) lower confidence limit of the treatment comparison
CL.hi(%) upper confidence limit of the treatment comparison
PE(%) point estimate of the treatment comparison (aka GMR)
CI assessment whether the CI lies entirely within the acceptance range (pass|fail)
GMR assessment whether the PE lies entirely within the GMR-restriction 80.00--125.00% (pass|fail)
BE mixed (aggregate) assessment whether the study demonstrates bioequivalence (pass|fail)

If ola = TRUE and at least one studentized outlier was detected:

outlier outlying subject(s)
CVwR.rec(%) intra-subject coefficient of variation of R; recalculated after exclusion of outlier(s)
swR.rec intra-subject standard deviation of the reference treatment after exclusion of outlier(s)
sw.ratio.rec ratio of intra-subject standard deviations of T and R after exclusion of outlier(s); full replicates only
  • If reference-scaling is applicable (i.e., CVwR(%) >30):

    L.rec(%) recalculated lower expanded limit of the AR

  • If reference-scaling is not applicable (i.e., CVwR(%) 30):

    BE.rec.lo(%) lower limit of the conventional AR ( 80)

CI.rec assessment whether the CI lies entirely within the new acceptance range (pass|fail)
GMR.rec assessment whether the PE lies entirely within the GMR-restriction 80.00--125.00% (pass|fail)
BE.rec mixed (aggregate) assessment whether the study demonstrates bioequivalence (pass|fail)

Warning

Files may contain a commentary header. If reading from a CSV-file, each line of the commentary header must start with "# " (hashmark space = ASCII 35 ASCII 32). If reading from an Excel-file all lines preceding the column headers are treated as a comment.

Clarification

The ‘ASCII line chart’ in the result file gives the confidence limits with filled black squares and the point estimate as a white rhombus. If a confidence limit exceeds the maximum possible expansion limit, it is shown as a triangle. Expanded limits are given as double vertical lines. Unscaled limits, the GMR restriction, and 100% are given with single vertical lines. The ‘resolution’ is approximatelly 0.5% and therefore, not all symbols might be shown. The CI and PE take presedence over the limits and the expanded limits over unscaled ones.

Disclaimer

Program 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.

Details

The model for the estimation of CVwR is lm(log(PK) ~ sequence + subject%in%sequence + period, data = data[data$treatment == "R", ]) where all effects are fixed. The model for the treatment comparison is lm(log(PK) ~ sequence + subject%in%sequence + period + treatment, data = data) where all effects are fixed. Tested designs

  • 4-period 2-sequence full replicates TRTR | RTRT TRRT | RTTR TTRR | RRTT

  • 2-period 4-sequence replicate TR | RT | TT | RR (Balaam<U+2019>s design)

  • 4-period 4-sequence full replicates TRTR | RTRT | TRRT | RTTR TRRT | RTTR | TTRR | RRTT

  • 3-period 2-sequence full replicates TRT | RTR TRR | RTT

  • 3-period (partial) replicates TRR | RTR | RRT TRR | RTR (extra-reference design)

Data structure

  • Columns must have the headers subject, period, sequence, treatment, PK, and/or logPK. Any order of columns is acceptable. Uppercase and mixed case headers will be internally converted to lowercase headers.

    • subject must be integers or (any combination of) alphanumerics [A-Z, a-z, -, _, #, 0-9]

    • period must be integer numbers.

    • sequence must be contained in the tested designs (numbers or e.g., ABAB are not acceptable).

    • The Test treatment must be coded T and the Reference R.

References

European Medicines Agency, Committee for Medicinal Products for Human Use. Guideline on the Investigation of Bioequivalence. CPMP/EWP/QWP/1401/98<U+00A0>Rev.<U+00A0>1/<U+00A0>Corr<U+00A0>**. London. 20 January 2010. online

European Generic and Biosimilar Medicines Association. 3 EGA Symposium on Bioequivalence. Questions and Answers on the Revised EMA Bioequivalence Guideline. London. 1 June 2010. online

European Medicines Agency, Committee for Medicinal Products for Human Use. Questions & Answers: positions on specific questions addressed to the Pharmacokinetics Working Party (PKWP). EMA/618604/2008<U+00A0>Rev.<U+00A0>13. London. 19 November 2015. online

European Medicines Agency. Clinical pharmacology and pharmacokinetics: questions and answers. 3.1 Which statistical method for the analysis of a bioequivalence study does the Agency recommend? Annex I. EMA/582648/2016. London. 21 September 2016. online

Executive Board of the Health Ministers<U+2019> Council for GCC States. The GCC Guidelines for Bioequivalence. Version 3.0. May 2021. online

Health Canada. Guidance Document. Conduct and Analysis of Comparative Bioavailability Studies. Ottawa. 2018/06/08. online

European Medicines Agency, Committee for Medicinal Products for Human Use. Guideline on the pharmacokinetic and clinical evaluation of modified release dosage forms. EMA/CPMP/EWP/280/96<U+00A0>Corr1. London. 20 November 2014. online

World Health Organization, Prequalification Team: medicines. Guidance Document: Application of reference-scaled criteria for AUC in bioequivalence studies conducted for submission to PQTm. Geneva. 22 November 2018. online

World Health Organization. Application of reference-scaled criteria for AUC in bioequivalence studies conducted for submission to PQT/MED. Geneva. 02 July 2021. online

U.S. Food and Drug Administration, Center for Drug Evaluation and Research. Draft Guidance for Industry. Bioequivalence Studies with Pharmacokinetic Endpoints for Drugs Submitted Under an ANDA. August 2021. download

Labes D, Sch<U+00FC>tz H. Inflation of Type I Error in the Evaluation of Scaled Average Bioequivalence, and a Method for its Control. Pharm Res. 2016; 33(11): 2805--14. 10.1007/s11095-016-2006-1

See Also

method.B evaluation by a linear mixed effects model (subjects random)

Examples

Run this code
# NOT RUN {
# Importing from a CSV-file, using most of the defaults: variable
# separator colon, decimal separator period, no outlier-analyis,
# print to file.
# Note: You must adapt the path-variables. The example reads from
# the data provided by the library. Write-permissions must be granted
# for 'path.out' in order to save the result file. Here the default
# (R's temporary folder) is used. If you don't know where it is,
# type tempdir() in the console.
# }
# NOT RUN {
path.in  <- paste0(find.package("replicateBE"), "/extdata/")
method.A(path.in = path.in, file = "DS", set = "01", ext = "csv")
# Should result in:
#   CVwT               :  35.16%
#   swT                :   0.34138
#   CVwR               :  46.96% (reference-scaling applicable)
#   swR                :   0.44645
#   Expanded limits    :  71.23% ... 140.40% [100exp(<U+00B1>0.760<U+00B7>swR)]
#   swT / swR          :   0.7647 (similar variabilities of T and R)
#   sw-ratio (upper CL):   0.9324 (comparable variabilities of T and R)
#   Confidence interval: 107.11% ... 124.89%  pass
#   Point estimate     : 115.66%              pass
#   Mixed (CI & PE)    :                      pass
#
# Internal reference dataset 01 used and results to R's
# temporary folder. Additional outlier-analyis.
method.A(ola = TRUE, data = rds01)
# Should give the same as above. Additionally:
#   Outlier fence      :  2<U+00D7>IQR of studentized residuals.
#   Recalculation due to presence of 2 outliers (subj. 45|52)
#   CVwR (outl. excl.) :  32.16% (reference-scaling applicable)
#   swR (recalculated) :   0.31374
#   Expanded limits    :  78.79% ... 126.93% [100exp(<U+00B1>0.760<U+00B7>swR)]
#   swT / swR (recalc.):   1.0881 (similar variabilities of T and R)
#   sw-ratio (upper CL):   1.3282 (comparable variabilities of T and R)
#   Confidence interval: pass
#   Point estimate     : pass
#   Mixed (CI & PE)    : pass
# Same dataset. Show information about outliers and the ANOVA-table.
method.A(ola = TRUE, print = FALSE, verbose = TRUE, data = rds01)
# }
# NOT RUN {
# Generate the data.frame of results (full precision) and show it
# in the console
x <- method.A(ola = TRUE, details = TRUE, print = FALSE, data = rds01)
print(x, row.names = FALSE)
#
# Assess the Type I Error and iteratively adjust alpha if necessary.
# Not run: due to timing policy of CRAN for examples
# }
# NOT RUN {
method.A(adjust = TRUE, data = rds01)
# }
# NOT RUN {
# Should give in the result file:
#   Assessment of the empiric Type I Error (TIE); 1,000,000 studies simulated.
#     TIE not > nominal 0.05; consumer risk is controlled.
#
# Same with recalculation based on outliers, iteratively adjust alpha
# if necessary
# }
# NOT RUN {
method.A(ola = TRUE, adjust = TRUE, data = rds01)
# }
# NOT RUN {
# Should give in the result file:
#   Assessment of the empiric Type I Error (TIE) based on original CVwR;
#   1,000,000 studies simulated.
#     TIE not > nominal 0.05; consumer risk is controlled.
#   Assessment of the empiric Type I Error (TIE) based on recalculated CVwR;
#   1,000,000 studies in each of the 8 iterations simulated.
#     TIE for alpha 0.050000         : 0.07018
#     TIE for adjusted alpha 0.033416: 0.05000
#
# Repeat the evaluation with the adjusted alpha.
# }
# NOT RUN {
method.A(alpha = 0.033416, ola = TRUE, adjust = TRUE, data = rds01)
# }
# NOT RUN {
# Should give in the result file:
#   alpha              :   0.033416 (93.3168% CI)
#   Confidence interval: 106.16% ... 126.00%  pass
#   Point estimate     : 115.66%              pass
#   Mixed (CI & PE)    :                      pass
#   Assessment based on recalculated CVwR 32.16%
#   Confidence interval: pass
#   Point estimate     : pass
#   Mixed (CI & PE)    : pass
#   Assessment of the empiric Type I Error (TIE) based on original CVwR;
#   1,000,000 studies simulated.
#     TIE not > nominal 0.05; consumer risk is controlled.
#   Assessment of empiric Type I Error (TIE) based on recalculated CVwR;
#   1,000,000 studies in each of the 8 iterations simulated.
#     TIE for alpha 0.033416         : 0.05000
#     TIE not > nominal 0.05; consumer risk is controlled.
# }

Run the code above in your browser using DataLab