Assess bioequivalence against a regulatory framework
Source:R/bioequivalence.R, R/sparse_bootstrap.R
be_assess.Rdbe_assess() performs a complete bioequivalence (BE) assessment of one or
more noncompartmental endpoints against a regulatory framework, including
reference scaling and the pass/fail decision. It accepts the results of
pk.nca() directly (a PKNCAresults object) or a tidy long data.frame, so
the same workflow that produces NCA parameters flows into the regulatory
decision. It is a thin wrapper over be_fit_models() that adds the
be_assess class and its print/summary methods.
Usage
be_assess(object, ...)
# Default S3 method
be_assess(
object,
reference_col,
reference_value,
endpoints = c("cmax", "aucinf.obs", "aucinf.pred", "auclast"),
regulator = "ABE",
model_type = NULL,
alpha = 0.1,
subject = NULL,
sequence = NULL,
period = NULL,
design = NULL,
covariates = NULL,
heteroscedastic = FALSE,
widen_endpoints = NULL,
widen_default = TRUE,
...
)
# S3 method for class 'PKNCAresults_sparse_bootstrap'
be_assess(
object,
reference_col,
reference_value,
endpoints = c("cmax", "aucinf.obs", "aucinf.pred", "auclast"),
regulator = "ABE",
model_type = NULL,
alpha = 0.1,
subject = NULL,
sequence = NULL,
period = NULL,
design = NULL,
covariates = NULL,
heteroscedastic = FALSE,
widen_endpoints = NULL,
widen_default = TRUE,
...
)Arguments
- object
A
PKNCAresultsobject or a tidy long data.frame with aPPTESTCDcolumn of parameter names, aPPORRES/PPSTREScolumn of values, and subject/sequence/period/treatment columns. The results of a sparse bootstrap (from aPKNCAconcobject made bysparse_bootstrap()) are compared with the percentile intervals of the bootstrap replicates (Shen and Machado 2017); see Details.- ...
Arguments passed to the methods
- reference_col
The column identifying the formulation/treatment.
- reference_value
The value of
reference_colthat is the reference formulation.- endpoints
Character vector of NCA parameters (matched against
PPTESTCD) to assess.- regulator
The regulatory framework (see
be_regulator()); one of"ABE","EMA","HC","GCC","FDA","NTID","HVNTID", or"descriptive"(no acceptance limits or pass/fail).- model_type
The model for the average-BE point estimate, one of
"lmer"(mixed model, for crossover/replicate designs),"anova"(fixed-effects, for parallel designs),"isc"(intra-subject contrasts, the FDA reference-scaled path),"nlme"(mixed model with treatment-specific residual variances, for crossover/replicate designs), or"gls"(generalized least squares with treatment-specific residual variances, for parallel designs). WhenNULL(default) it is chosen from the design, the regulator, andheteroscedastic.- alpha
The significance level; the confidence interval has level
1 - alpha(default0.10gives the 90% interval).- subject, sequence, period
Column names for the subject, randomization sequence, and period. When
NULLthey are taken from thePKNCAresultsobject or detected from common column names.sequencemay be absent.- design
An optional
be_design()object; computed from the data whenNULL.- covariates
An optional character vector of column names added to every model as additive fixed effects (numeric columns as linear terms, character or factor columns as factors). They must not be missing in any analyzed row. For a
PKNCAresultsobject they must be columns ofas.data.frame(object), which means grouping columns. The within-subject variances used for reference scaling and the intra-subject contrasts do not use covariates.- heteroscedastic
Logical. When
TRUE, estimate a separate residual variance for each treatment (see Details).- widen_endpoints
For the expanding-limits frameworks (
"EMA","HC", and"GCC"), endpoints whose acceptance limits widen in addition to the framework's own choice (the endpoints judged like Cmax for the EMA and GCC, like AUC for Health Canada; seebe_regulator()). Use it for an endpoint that the guidance widens but PKNCA cannot recognize from its name, such as a partial AUC of a modified-release product (EMA), or an endpoint that is neither a PKNCA parameter nor a CDISC code. Naming an endpoint for another framework is an error;be_compare()passes it to the expanding-limits frameworks only, and each adds it to its own choice.- widen_default
For the expanding-limits frameworks, whether the framework's own choice of endpoints widens (the default,
TRUE). WithFALSEonly the endpoints inwiden_endpointswiden, for example none when the protocol did not specify widening in advance; Health Canada still judges Cmax by its point estimate.FALSEfor another framework is an error;be_compare()applies it to the expanding-limits frameworks only.
Value
An object of class be_assess (a data.frame), ordered by endpoint
(in the order requested) then by test formulation (reference-first), with
one row per endpoint and test formulation and the columns endpoint,
test, n (the number of subjects behind the ratio shown; see Details),
design, units (the endpoint's measurement units; the column
is omitted with a warning when units are not provided), the reference and
test geometric means with their 90% confidence intervals on the measurement
scale (gm_reference, gm_reference_lower, gm_reference_upper, gm_test,
gm_test_lower, gm_test_upper), gmr_percent, ci_lower, ci_upper,
cvwr_percent, cvwt_percent, swr, rule, limit_lower,
limit_upper, criterion, regulator, model_type, and pass. rule
names the criterion the row's decision used: "ABE" (the confidence
interval within 80.00-125.00%), "ABEL" (the confidence interval within
widened limits), "PE" (the point estimate alone within 80.00-125.00%),
"RSABE" (the reference-scaled bound), "NTID", or "HVNTID".
limit_* are NA for the RSABE criterion and criterion is NA for the
limit-based frameworks. For regulator = "descriptive" the rule,
limit_lower, limit_upper, criterion, and pass columns are omitted.
A caption attribute documents the model, the decision rule for each
endpoint, and its source guidance, or states that no regulatory decision
was applied.
Details
The model type is selected automatically from the design and the regulator.
By design, a parallel study (one measurement per subject) uses a fixed-effects
ANOVA ("anova"), while a crossover or replicate study (repeated measures per
subject) uses the mixed model ("lmer") for the geometric mean ratio and its
confidence interval. The FDA reference-scaled frameworks (FDA RSABE, NTID,
HVNTID) always use intra-subject contrasts ("isc"), as the guidances
specify, regardless of design. Each subject's contrast is its mean log test
minus its mean log reference, from the subjects with every test and
reference administration their sequence calls for; the ratio is the
unweighted mean of the sequence means of the contrasts, with n - m degrees
of freedom for n subjects in m sequences (FDA draft guidances on
progesterone and warfarin sodium). Without a sequence column, a subject's
sequence is its treatment-by-period pattern. The unscaled 80.00-125.00%
criterion of these frameworks (FDA RSABE when swR < 0.294, NTID, and
HVNTID) uses the model of model_type; the default "isc" is the guidance
mixed-effects model for replicate designs: fixed sequence, period, and
treatment effects, correlated treatment random effects for each subject, a
residual variance per treatment, REML, and Satterthwaite degrees of freedom
(SAS RANDOM TRT/TYPE=FA0(2), REPEATED/GRP=TRT). A formulation that no
subject receives twice has its residual variance folded into its
between-subject variance, where the guidance model is over-specified, and a
subject missing a period forms its own sequence when the sequence is derived
from the treatment pattern. When the mixed model cannot be fit (for
example, a formulation whose replicates agree exactly), only a decision that
needs the unscaled criterion stops with an error. Each row shows the ratio
and interval its decision used: the intra-subject contrasts for the
reference-scaled criterion and the model for the unscaled one, and n counts
the subjects behind that ratio: for the intra-subject contrasts, the subjects
with every test and reference administration their sequence calls for; for
the model, every subject with the test or the reference formulation. Pass
model_type to override ("lmer", "anova", "isc", "nlme", or
"gls"); with "isc" the FDA mixed model also gives the ratio for the
other frameworks, and a design without a replicated formulation keeps the
fixed-effects ANOVA ratio. Within-subject
variability for the FDA frameworks uses the FDA estimator from within-sequence
differences between replicate administrations (model_type = "isc" in
be_within_var()); for the other frameworks it uses the EMA ANOVA estimator
for the "lmer"/"anova"/"isc" paths and the treatment-specific
mixed-model estimator for "nlme".
With heteroscedastic = TRUE the residual variance is estimated separately
for each treatment: a crossover or replicate study uses nlme::lme() with
varIdent(~ 1 | treatment) ("nlme"), and a parallel study uses
nlme::gls() with the same variance structure ("gls"). lme4::lmer()
cannot estimate treatment-specific residual variances (its weights are
fixed prior weights), so heteroscedastic = TRUE with model_type = "lmer"
is an error. Without reference scaling, "nlme" accepts non-replicated
designs and several test formulations; with reference scaling it needs a
fully replicated design and one test formulation, because the
per-formulation variances are then used as the within-subject variances.
regulator = "descriptive" estimates the geometric means, their ratio, and
its confidence interval exactly as for "ABE" but applies no acceptance
limits and reports no pass/fail, for comparisons such as food effect and
drug-drug interaction studies.
The expanding-limits frameworks widen only some endpoints, as their
guidances specify (see be_regulator() for the sources and for which
parameters, by PKNCA name or CDISC code, are judged like Cmax and like AUC):
the EMA and the GCC widen Cmax and the parameters judged like it (such as
Ctau,ss and Rmax), and Health Canada widens AUC and the parameters judged
like it and judges the Cmax group by its point estimate alone. Every other
endpoint needs its confidence interval within 80.00-125.00%. The rule
column names the criterion each row used. widen_endpoints adds endpoints
to those that widen, for example "aucint.last" for a partial AUC of a
modified-release product under the EMA modified-release guideline.
widen_default = FALSE drops the framework's own choice, for example when
the protocol did not specify widening in advance, which the EMA and the GCC
require; the endpoints in widen_endpoints still widen. Health Canada
judges the Cmax group by its point estimate unless an endpoint is named in
widen_endpoints.
For the results of a sparse bootstrap (Shen and Machado 2017; see
sparse_bootstrap()), there is one estimate per treatment, from the sparse
data, rather than one per subject. The ratio of the test and reference
estimates is the point estimate, and its confidence interval is the
percentile interval of the ratios of the bootstrap replicates (model_type = "bootstrap"). The gm_* columns hold the estimates of each treatment with
their percentile intervals. A parallel design resamples the treatments
independently; for a crossover, give the treatment column as paired to
sparse_bootstrap(). There is no within-subject variance, so only the
"ABE" and "descriptive" frameworks apply, and the results may have no
groups other than reference_col (filter them first).
Methods (by class)
be_assess(PKNCAresults_sparse_bootstrap): Bioequivalence from the percentile intervals of a sparse bootstrap (Shen and Machado 2017)
References
Shen M, Machado SG. Bioequivalence evaluation of sparse sampling pharmacokinetics data using bootstrap resampling method. Journal of Biopharmaceutical Statistics. 2017;27(2):257-264. doi:10.1080/10543406.2016.1265543
See also
be_compare() to assess one dataset under several frameworks,
be_within_var(), and be_regulator().
Other Bioequivalence:
be_compare(),
be_dataset(),
be_design(),
be_expand_limits(),
be_extract_param(),
be_fit_model_single(),
be_fit_models(),
be_regulator(),
be_table(),
be_within_var()
Examples
# A replicate-design crossover in long (PPTESTCD/PPORRES) format
set.seed(1)
nsub <- 24
seqs <- rep(c("TRTR", "RTRT"), length.out = nsub)
b <- stats::rnorm(nsub, sd = 0.4)
d <- do.call(rbind, lapply(seq_len(nsub), function(i) {
trt <- strsplit(seqs[i], "")[[1]]
data.frame(
subject = i, sequence = seqs[i], period = seq_along(trt), treatment = trt,
PPTESTCD = "cmax",
PPORRES = exp(log(100) + ifelse(trt == "T", 0.04, 0) + b[i] +
stats::rnorm(length(trt), sd = 0.45))
)
}))
# The EMA widens the limits of Cmax
be_assess(d, reference_col = "treatment", reference_value = "R",
endpoints = "cmax", regulator = "EMA")
#> Warning: Units were not found in the data; omitting the `units` column. Supply units via a PKNCAresults object or `PPSTRESU`/`PPORRESU` columns.
#> Bioequivalence assessment: EMA (model_type lmer, 90% CI)
#> Design: full_replicate
#>
#> endpoint test n design gm_reference gm_reference_lower
#> cmax T 24 full_replicate 114.44 95.46
#> gm_reference_upper gm_test gm_test_lower gm_test_upper gmr_percent ci_lower
#> 137.2 112.15 93.55 134.46 98 85.72
#> ci_upper cvwr_percent cvwt_percent swr rule limit_lower limit_upper criterion
#> 112.04 34.11 47.67 0.33 ABEL 77.71 128.68 NA
#> regulator model_type pass
#> EMA lmer TRUE
#>
#> Caption: EMA bioequivalence assessment (90% CI). Geometric means and the geometric mean ratio are least-squares means from a mixed-effects model (lmerTest::lmer, Satterthwaite degrees of freedom); the 90% CI comes from exponentiated least-squares-mean differences (emmeans). The confidence-interval limits of cmax widen with the within-reference variability (ABEL) when CVwR exceeds 30%, capped per the regulator. Source: EMA Guideline on the Investigation of Bioequivalence (CPMP/EWP/QWP/1401/98 Rev. 1), sections 4.1.8 and 4.1.10. Within-formulation variances (swR, swT) are estimated by ANOVA on each formulation's replicates.
#>