be_fit_models() runs the single bioequivalence calculation path and returns
the regulatory pass/fail table. It coordinates the stages in order:
be_dataset() to prepare the data, be_design() to classify the design and
choose the model, be_fit_model_single() to fit, be_extract_param() to
extract the parameters, and be_table() to apply the regulatory decision.
be_assess() and be_compare() are thin verbs over it.
Usage
be_fit_models(
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
)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.- 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).
Value
A data.frame with one row per endpoint and test formulation (the
columns described in be_assess()).
See also
Other Bioequivalence:
be_assess(),
be_compare(),
be_dataset(),
be_design(),
be_expand_limits(),
be_extract_param(),
be_fit_model_single(),
be_regulator(),
be_table(),
be_within_var()