be_dataset() prepares a noncompartmental result for bioequivalence
calculation: it accepts a PKNCAresults object or a tidy long data.frame,
resolves the value column, drops excluded/invalid rows, detects the
subject/sequence/period columns, validates the reference, and sets the
reference formulation as the first factor level. It standardizes the
modeling columns (.subject, .sequence, .period, .trt, .logval) used
by the downstream fitters.
Usage
be_dataset(
object,
reference_col,
reference_value,
endpoints = c("cmax", "aucinf.obs", "aucinf.pred", "auclast"),
subject = NULL,
sequence = NULL,
period = NULL
)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.- 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.
Value
An object of class be_dataset: a list with data (the
standardized long frame, including a .units column), columns (the
resolved column names, including units), reference_value, test_levels,
and endpoints (those present).
Details
The endpoint value is taken from the PPSTRES column when present, otherwise
PPORRES. The measurement units are read from the matching units column –
PPSTRESU for PPSTRES, or PPORRESU for PPORRES – which a PKNCAresults
object provides automatically; a plain data.frame supplies units the same way
by including the corresponding PPSTRESU/PPORRESU column. When no units
column is present, units are unavailable and the units column is omitted
from the assessment table.
See also
Other Bioequivalence:
be_assess(),
be_compare(),
be_design(),
be_expand_limits(),
be_extract_param(),
be_fit_model_single(),
be_fit_models(),
be_regulator(),
be_table(),
be_within_var()