Bioequivalence.jl
The Bioequivalence.jl package provides Bioequivalence Data Analysis (Bioequivalence for short). It analyzes data from completed bioequivalence (BE) studies and assesses whether formulations meet the bioequivalence criteria of regulatory agencies such as the FDA and the EMA. This is the package to use when analyzing the results of a bioequivalence study.
For planning a study (power estimates, sample-size determination, and related pre-study analysis), use the complementary package BioequivalencePower.jl instead. The two are companion packages: Bioequivalence.jl is post-hoc data analysis, BioequivalencePower.jl is pre-study planning (see its own documentation section).
using Pkg
Pkg.add("Bioequivalence")A bioequivalence dataset is a long-format table produced by the non-compartmental analysis (NCA) of a study's concentration–time data. Each row corresponds to a single profile (one subject in one period) and carries one or more pharmacokinetic (PK) parameters, with typical parameters being AUC, Cmax, and Tmax.
For example, this 2×2 crossover dataset has one row per subject per period, with the PK parameters AUC and Cmax:
using Bioequivalence, PharmaDatasets
be_data = dataset(joinpath("bioequivalence", "RT_TR", "PJ2017_3_12"))
first(be_data, 6)| Row | id | sequence | period | AUC | Cmax |
|---|---|---|---|---|---|
| Int64 | String3 | Int64 | Float64? | Float64? | |
| 1 | 1 | RT | 1 | 58.16 | 2.589 |
| 2 | 1 | RT | 2 | 79.34 | 2.827 |
| 3 | 2 | TR | 1 | 150.12 | 5.145 |
| 4 | 2 | TR | 2 | 142.29 | 3.216 |
| 5 | 3 | RT | 1 | 69.68 | 2.48 |
| 6 | 3 | RT | 2 | 85.59 | 4.407 |
A single call to pumas_be reads such a dataset, detects the study design, fits the appropriate model, and assesses the bioequivalence of a specific endpoint against a regulatory criterion (if :AUC is among the parameters and none is specified, it is chosen as the default):
pumas_be(be_data)| Observation Counts | ||
| Sequence ╲ Period | 1 | 2 |
| RT | 23 | 23 |
| TR | 23 | 23 |
| Paradigm: Non replicated crossover design | ||||
| Model: Linear model | ||||
| Criteria: Standard ABE | ||||
| Endpoint: AUC | ||||
| Formulations: Reference(R), Test(T) | ||||
| Results(AUC) | Assessment | Criteria | ||
| R | Geometric Marginal Mean | 78.95 | ||
| Geometric Naive Mean | 83.08 | |||
| T | Geometric Marginal Mean | 86.99 | ||
| Geometric Naive Mean | 86.35 | |||
| Geometric Mean T/R Ratio (%) | 110.2 | |||
| Degrees of Freedom | 43 | |||
| 90% Confidence Interval (%) | [94.08, 129] | Fail | CI ⊆ [80, 125] | |
| Variability | CV (%) | σ̂ | 46.89 | 0.4458 | ||
| ANOVA | Formulation (p-value) | 0.308 | ||
| Sequence (p-value) | 0.1742 | |||
| Period (p-value) | 0.5947 | |||
This is the standard 2×2 crossover trial (two formulations, two sequences RT and TR, two periods). The printed summary reports the design and fitted model, the geometric mean test/reference ratio with its 90% confidence interval, the pass/fail assessment, and variability and ANOVA diagnostics.
How this documentation is organized
This is a reference: it defines what each function does, what its arguments mean, what the output object contains, and which regulatory rule each criterion applies. It does not teach bioequivalence methodology. For that, see the Pumas course on bioequivalence and the tutorial linked below.
- Workflow: the one-call entry point and the lower-level pipeline.
- Input Data: the data schema and preprocessing.
- Study Designs: supported designs and how they are classified.
- Models: model selection and the model definitions.
- Details of Computation: confidence intervals, within-subject variability, and p-values.
- Regulatory Criteria: the FDA, EMA, and other agency criteria and what each one checks.
- Output: the output object and the printed summary.
- API Reference: every public function and type.
Regulatory references
Pumas is built with regulatory acceptance in mind: the package implements the bioequivalence criteria as the health authorities define them, so that an analysis run here corresponds to the decision rule a submission would be judged against. The documents behind those criteria are listed below; which criterion follows which document is stated on the Regulatory Criteria page.
FDA:
- FDA (2021). Bioequivalence Studies With Pharmacokinetic Endpoints for Drugs Submitted Under an ANDA, the general BA/BE guidance for ANDAs (see document).
- FDA (2001). Statistical Approaches to Establishing Bioequivalence, the companion statistical guidance (the TOST, the 90% CI, the average-bioequivalence framework) (see document).
- FDA (2011). Draft Guidance on Progesterone, RSABE for HVD (see document).
- FDA (2012). Draft Guidance on Warfarin Sodium, RSABE for NTID (see document).
EMA:
- EMA (2010). Guideline on the Investigation of Bioequivalence (CPMP/EWP/QWP/1401/98 Rev. 1) (see document).
- EMA. Questions & Answers: Positions on specific questions addressed to the Pharmacokinetics Working Party (EMA/618604/2008, periodically revised), which defines the ABEL treatment-comparison models Methods A (all-fixed-effects ANOVA) and B (mixed model), and the reference-only ANOVA (the SAS scheme) for
σwᵣ(see document).
Health Canada:
- Health Canada. Guidance Document: Comparative Bioavailability Standards: Formulations Used for Systemic Effects (revised 2018), section 2.1.1.8 Highly variable drug products, which gives the
k = 0.76expansion onAUC, capped atσ̂wᵣ = 0.534(CVᵣ ≈ 57.4%, limits[66.7, 150]%) (see document).
See also, ICH harmonization:
- ICH. M13A: Bioequivalence for Immediate-Release Solid Oral Dosage Forms (2024) (see document).
- ICH. M13C: Reference-scaled approaches for highly variable and narrow therapeutic index drugs (under development).
Learning bioequivalence
For a comprehensive introduction to bioequivalence, see the Pumas course on bioequivalence. For a denser description of the outputs, see the quick outputs tutorial. This documentation, by contrast, is a reference for the options and usage of the package and for what each output means (see Output) rather than a guide to interpreting them.
The supported designs and paradigms have been validated against published reference datasets, including Chow & Liu (2009), 10.1201/9781420011678; Patterson & Jones (2017), 10.1201/9781315374161; Schütz, Labes & Fuglsang (2014), 10.1208/s12248-014-9661-0; Fuglsang, Schütz & Labes (2015), 10.1208/s12248-014-9704-6; and Schütz et al. (2020), 10.1208/s12248-020-0427-6. The implementation has additionally undergone extensive testing against reference datasets to confirm it reproduces their published results.