Inspect the structure of a ferx model file
Description
Parses a .ferx file without fitting and prints a compact summary of its model structure: PK model type, inter-individual variability (IIV), inter-occasion variability (IOV), and residual error type. Useful for verifying that a model file will be interpreted as expected before committing to a potentially long estimation run.
Usage
ferx_model_inspect(path)Arguments
path: Path to a.ferxmodel file, or aferx_fitobject returned by[ferx_fit](ferx_fit.qmd).
Details
Alternatively, pass a ferx_fit object to display the structure that was auto-derived during fitting (reads fit$model_structure directly, so no file path is needed post-fit).
Model DSL features detected
ferx_model_inspect() reflects the parser’s view of a .ferx file. Recently added DSL features that surface here include multi-endpoint residual error (per-CMT [error_model]), the [scaling] block for unit conversion / ODE readout (see NEWS.md for Form A/B/C details), and inter-occasion variability via kappa_* declarations. Steady-state dosing (SS/IIcolumns) is a data-side feature and is documented under [ferx_fit](ferx_fit.qmd).
Seealso
[ferx_model_show](ferx_model_show.qmd), [ferx_model_edit](ferx_model_edit.qmd), [ferx_fit](ferx_fit.qmd)Other model-editing: [ferx_get_section](ferx_get_section.qmd)(), [ferx_model](ferx_model.qmd)(), [ferx_model_edit](ferx_model_edit.qmd)(), [ferx_model_new](ferx_model_new.qmd)(), [ferx_model_section](ferx_model_section.qmd)(), [ferx_model_set_section](ferx_model_set_section.qmd)(), [ferx_model_show](ferx_model_show.qmd)(), [ferx_model_validate](ferx_model_validate.qmd)(), [ferx_set_section](ferx_set_section.qmd)()
Concept
model-editing
Value
A named list (invisibly) with fields: theta_names(character vector of population parameter names), model_type(short label such as "1-cpt oral" or NULL when not unambiguously detectable), iiv (omega names), iov(kappa names), and residual (error type - one of "proportional", "additive", "combined", or "additive (log-transformed)" for log-transform-both-sides models written as log(DV) ~ additive(...) or DV ~ log_additive(...)). For multi-endpoint (per-CMT) error models, residual is reported as a string of the form "per-CMT (CMT2=proportional, CMT3=additive)".
Examples
ex <- ferx_example("warfarin")
ferx_model_inspect(ex$model)
# Programmatic access
s <- ferx_model_inspect(ex$model)
s$theta_names # c("TVCL", "TVV", "TVKA")
s$model_type # "1-cpt oral"
s$iiv # c("ETA_CL", "ETA_V", "ETA_KA")
s$residual # "proportional"