Function, option and example index

This chapter lists every ferx-r function, setting, model file block, data column, bundled example, warning category and fit object slot in the pinned build (6e2f701), with the chapter that covers it. It is generated from the book’s feature inventory, the package’s help pages and the ferx-core documentation of the pinned engine.

Functions

Help pages: ?name. Function reference on the web: ferx-r reference.

Function Description Arguments Chapter
check_diagnostics() Structured diagnostic flags from a fit result fit Initial estimates and a first fit
check_strictness() Eligibility gates for a candidate fit fit, require_converged = TRUE, require_covariance = FALSE, max_condition_number = 1000, max_correlation = 0.95, reject_on_boundary = TRUE, reject_init_stall = TRUE Model development and selection
ferx_allometry() Allometric scaling model = NULL, data = NULL, config = NULL, covariate = NULL, reference = NULL, parameters = NULL, exponents = NULL, estimate = FALSE, lower = NULL, upper = NULL, fit = TRUE, threads = NULL, retries = NULL, directory = NULL Covariate modeling
ferx_amd() Automatic model development (AMD) model = NULL, data = NULL, search_space = NULL, config = NULL, strategy = NULL, retries_on = NULL, skip = NULL, rank = NULL, cutoff = NULL, threads = NULL, retries = NULL, directory = NULL, resume = FALSE, progress Model development and selection
ferx_amd_plan() The AMD pipeline as planned, without fitting anything model = NULL, data = NULL, search_space = NULL, config = NULL, strategy = NULL, retries_on = NULL, skip = NULL Model development and selection
ferx_apply_selection() Preview data-selection filtering data, ignore = NULL, accept = NULL, ignore_ids = NULL, excluded = FALSE Preparing and checking the analysis dataset
ferx_bic() BIC variants for model selection fit, type Model development and selection
ferx_bootstrap() Non-parametric case bootstrap model, data = NULL, samples = 200, seed = 1, threads = NULL, stratify_on = NULL, sample_size = NULL, update_inits = TRUE, run_base_model = TRUE, keep_covariance = FALSE, dofv = FALSE, skip_minimization_terminated = TRUE, skip_estimate_near_boundary = TRUE, skip_covariance_step_terminated = FALSE, skip_with_covstep_warnings = FALSE, ci = 95, directory = NULL, resume = FALSE, retry_failed = FALSE, progress, verbose = FALSE Parameter uncertainty
ferx_bootstrap_summarize() Re-summarise a finished bootstrap run directory, skip_minimization_terminated = TRUE, skip_estimate_near_boundary = TRUE, skip_covariance_step_terminated = FALSE, skip_with_covstep_warnings = FALSE, ci = 95 Parameter uncertainty
ferx_calc_npde() Simulation-based NPDE / NPD diagnostics from a fit fit, nsim = 1000L, seed = NULL, model = NULL, data = NULL Diagnosing the model
ferx_check_init() Quick convergence check with an optimizer trace model, data = NULL, method = "focei", maxiter = NULL Initial estimates and a first fit
ferx_coef() Pull a parameter estimate or its standard error by name fit, param = NULL Initial estimates and a first fit
ferx_collect() Retrieve the result of a background fit handle, verbose = TRUE Estimation methods and controlling the fit
ferx_conddist() Per-subject SAEM conditional distribution of random effects fit Estimation methods and controlling the fit
ferx_cov_screen() Quick covariate screen against individual parameters and ETAs fit, threshold = 0.2 Covariate modeling
ferx_covariance() Run the covariance step against an existing fit fit, covariance_method = "r", mu_referencing = TRUE, verbose = FALSE Parameter uncertainty
ferx_covsearch() Stepwise covariate modelling (SCM) model = NULL, data = NULL, search_space = NULL, config = NULL, algorithm = NULL, p_forward = NULL, p_backward = NULL, max_steps = NULL, adaptive_scope_reduction = NULL, rank = NULL, cutoff = NULL, threads = NULL, retries = NULL, directory = NULL, resume = FALSE, progress Model development and selection
ferx_example() Get paths to example model and data files name = NULL A complete analysis in one chapter
ferx_fit() Fit a nonlinear mixed effects model model, data = NULL, method = NULL, covariance = NULL, verbose = NULL, bloq_method = NULL, threads = NULL, mu_referencing = NULL, sir = NULL, gradient = NULL, optimizer_trace = FALSE, scale_params = FALSE, inits_from_nca = FALSE, fd_hessian_step = NULL, settings = NULL, output = NULL, include_data = FALSE, ignore = NULL, accept = NULL, ignore_ids = NULL Initial estimates and a first fit
ferx_fit_async() Fit a model asynchronously model, data = NULL, tail_n = 6L, poll_interval = 0.5 Estimation methods and controlling the fit
ferx_gam_screen() GAM-based covariate pre-screening fit, etas = NULL, covariates = NULL, spline_df, include_linear = TRUE, shrinkage_warn = 0.3 Covariate modeling
ferx_get_columns() Inspect column headers of a data file data Preparing and checking the analysis dataset
ferx_get_warnings() Structured warnings from a ferx fit fit, as_df = FALSE Initial estimates and a first fit
ferx_globalsearch() Global model search model = NULL, data = NULL, search_space = NULL, config = NULL, algorithm = NULL, iiv_strategy = NULL, max_models = NULL, ga = NULL, penalties = NULL, rank = NULL, cutoff = NULL, threads = NULL, retries = NULL, directory = NULL, resume = FALSE, progress Model development and selection
ferx_iivsearch() Variability-structure search model = NULL, data = NULL, search_space = NULL, config = NULL, algorithm = NULL, correlation_algorithm = NULL, as_fullblock = NULL, block_retries = NULL, rank = NULL, cutoff = NULL, threads = NULL, retries = NULL, directory = NULL, resume = FALSE, progress Model development and selection
ferx_inits_from_nca() Derive NCA-based starting values without fitting model, data = NULL, method Initial estimates and a first fit
ferx_iovsearch() Inter-occasion variability search model = NULL, data = NULL, search_space = NULL, config = NULL, column = NULL, distribution = NULL, groups = NULL, block_retries = NULL, rank = NULL, cutoff = NULL, threads = NULL, retries = NULL, directory = NULL, resume = FALSE, progress Model development and selection
ferx_load_fit() Load a fit from a .fitrx bundle path Reproducibility and sharing
ferx_model() Create a ferx_model object data = NULL, model = NULL, template = NULL, path = NULL, overwrite = FALSE, edit = TRUE, print = FALSE Writing and managing model files
ferx_model_edit() Open a ferx model file in an editor path, dest = ".", overwrite = FALSE, save_as = NULL, .editor Writing and managing model files
ferx_model_get_section() Get a section from a ferx model x, section, strip = FALSE Writing and managing model files
ferx_model_inspect() Inspect the structure of a ferx model file path Writing and managing model files
ferx_model_set_section() Set a section in a ferx model x, section, lines Writing and managing model files
ferx_model_show() Display a ferx model file in the console path Writing and managing model files
ferx_model_to_frem() Prepare a FREM (Full Random Effects Model) dataset and model model, data = NULL, covariates = NULL, output_dir = NULL, output_model = NULL, output_data = NULL, fit = NULL Covariate modeling
ferx_model_validate() Validate a ferx model file for syntax and structural errors path, data = NULL Writing and managing model files
ferx_modelsearch() Structural PK model search model = NULL, data = NULL, search_space = NULL, config = NULL, algorithm = NULL, iiv_strategy = NULL, rank = NULL, cutoff = NULL, threads = NULL, retries = NULL, directory = NULL, resume = FALSE, progress Model development and selection
ferx_predict() Population predictions from a NLME model model, data = NULL, fit = NULL Simulating scenarios
ferx_predict_survival() Survival-function predictions for time-to-event endpoints model, data = NULL, times, fit = NULL Time-to-event models
ferx_runlog() Run log for a ferx fit fit, gradient_tol = 0.1, show_iterations = TRUE, verbose = TRUE Estimation methods and controlling the fit
ferx_runlog_iters() Print the full optimizer iteration history for a ferx fit fit, verbose = TRUE Estimation methods and controlling the fit
ferx_ruvsearch() Residual-error model search model = NULL, data = NULL, config = NULL, groups = NULL, p_value = NULL, skip = NULL, max_iter = NULL, cwres_prescreen = NULL, threads = NULL, retries = NULL, directory = NULL, resume = FALSE, progress Model development and selection
ferx_save_fit() Save a ferx fit to a portable .fitrx bundle fit, output, include_data = FALSE Reproducibility and sharing
ferx_se() Pull a parameter estimate or its standard error by name fit, param = NULL Initial estimates and a first fit
ferx_search_config() Load and validate a .ferxsearch search configuration path Model development and selection
ferx_search_coverage() Coverage of a search space against what the engine can express space Model development and selection
ferx_search_results() Read a search run’s table directory, partial = NULL, type Model development and selection
ferx_search_space() Parse and expand an MFL search space mfl, model = NULL, data = NULL Model development and selection
ferx_simulate() Simulate from a NLME model model, data = NULL, n_sim = 1L, seed = 42L, fit = NULL, match = FALSE, horizon = NULL Simulation-based evaluation: VPC
ferx_simulate_adaptive() Simulate state-reactive (adaptive / feedback) dosing model, data = NULL, n_sim = 1L, seed = 42L, verify = TRUE, max_decisions = 0L Adaptive dosing and TDM strategies
ferx_simulate_with_uncertainty() Simulate with parameter-uncertainty propagation model, data, fit, n_uncertainty_draws = 100L, n_sim_per_draw = 1L, method, seed = 42L Simulating scenarios
ferx_sir() Run SIR against an existing fit fit, sir_samples = 1000L, sir_resamples = 250L, sir_seed = NULL, sir_keep_samples = FALSE, verbose = FALSE Parameter uncertainty
ferx_stop() Stop a background fit handle Estimation methods and controlling the fit
ferx_trace() Read the optimizer trace from a ferx fit fit Estimation methods and controlling the fit
ferx_xpose() Build an object from a ferx fit fit, backend, continuous = NULL, categorical = NULL, runno = 1L, iterations = TRUE Diagnosing the model

S3 methods

Method Chapter
$.ferx_job Estimation methods and controlling the fit
plot.ferx_bootstrap Parameter uncertainty
plot.ferx_fit Estimation methods and controlling the fit
plot.ferx_job Estimation methods and controlling the fit
print.ferx_allometry Covariate modeling
print.ferx_amd Model development and selection
print.ferx_bootstrap Parameter uncertainty
print.ferx_conddist Estimation methods and controlling the fit
print.ferx_covsearch Model development and selection
print.ferx_data Preparing and checking the analysis dataset
print.ferx_fit Initial estimates and a first fit
print.ferx_globalsearch Model development and selection
print.ferx_iivsearch Model development and selection
print.ferx_inits Initial estimates and a first fit
print.ferx_iovsearch Model development and selection
print.ferx_job Estimation methods and controlling the fit
print.ferx_model Writing and managing model files
print.ferx_modelsearch Model development and selection
print.ferx_ruvsearch Model development and selection
print.ferx_search_config Model development and selection
print.ferx_search_space Model development and selection
print.ferx_summary Initial estimates and a first fit
summary.ferx_amd Model development and selection
summary.ferx_covsearch Model development and selection
summary.ferx_fit Initial estimates and a first fit
summary.ferx_globalsearch Model development and selection
summary.ferx_iivsearch Model development and selection
summary.ferx_iovsearch Model development and selection
summary.ferx_modelsearch Model development and selection
summary.ferx_ruvsearch Model development and selection

Fit settings

Keys for ferx_fit(settings = list(...)) and the [fit_options] block. The chapter column points at the section that uses the key; the ferx-core fit options page gives the full semantics. A blank Values cell means the key takes a free value (a number, a name or a list) rather than a fixed set; a blank Meaning means the pinned engine documents the key only in terms of other software, which this book does not quote.

Setting Values Default Meaning Chapter
accept Character vector of filter expressions. A record is kept only when all conditions pass; excluded if any fail. Preparing and checking the analysis dataset
adapt_interval 50 Iterations between step-size adaptation Estimation methods and controlling the fit
agq_eval_only Estimation methods and controlling the fit
analytic_cov_hessian true, false true Use the exact analytic R-matrix for the covariance step when the model is in scope, instead of the finite-difference-of-OFV Hessian. Parameter uncertainty
bayes_chains Number of independent chains (default 4); used for split-R-hat. Estimation methods and controlling the fit
bayes_iters Retained sampling sweeps per chain, before thinning (default 1000). Estimation methods and controlling the fit
bayes_seed Base RNG seed for the Bayes sampler. Independent of seed / saem_seed. Estimation methods and controlling the fit
bayes_thin Keep every bayes_thin-th sampling draw (default 1). Estimation methods and controlling the fit
bayes_warmup Warmup (burn-in + adaptation) sweeps per chain, discarded from the posterior (default 1000). Estimation methods and controlling the fit
checkpoint true, false true Periodically save a resume point so a run that is interrupted (e.g. Ctrl-C, a crashed job) can be restarted from where it stopped instead of from scratch. Estimation methods and controlling the fit
checkpoint_interval_secs integer 300 Minimum wall-clock seconds between checkpoint writes. Larger values reduce I/O overhead but lose more progress on an interrupt; smaller values save more often. Estimation methods and controlling the fit
conddist false Run a post-fit conditional-distribution pass estimating each subject’s p(η_i \| y_i) by MCMC. Estimation methods and controlling the fit
conddist_burnin 20 Burn-in draws discarded before accumulation, to forget the EBE-mode warm start. Estimation methods and controlling the fit
conddist_keep_samples false Retain the raw per-subject draws (written to {model}-conddist-samples.csv), not just the mean/SD. Estimation methods and controlling the fit
conddist_nsamp 200 Retained MCMC draws per subject in the conditional-distribution pass. Estimation methods and controlling the fit
cov_inner_tol float inner_tol (LTBS: min(inner_tol, 1e-8)) Inner EBE-reconvergence tolerance used only by the covariance step, decoupled from inner_tol. Parameter uncertainty
covariance_fallback none, sir none What to do when the covariance Hessian is non-PD, whether R is analytic or finite-difference. Parameter uncertainty
covariance_method r, s, rsr r Parameter uncertainty
ebe_warm_start false When an inner per-subject EBE solve fails its BFGS step and falls back to Nelder–Mead, warm-start the simplex from the BFGS partial η̂ rather than cold-starting from the prior mode η=0. Estimation methods and controlling the fit
fd_hessian_step float 1e-2 Initial relative step size for the finite-difference Hessian used in the covariance step. Parameter uncertainty
frem_predictions Covariate modeling
frem_rao_blackwell true FREM only: Rao-Blackwellise the covariate ETAs (integrate them analytically, importance-sample only the PK ETAs). Covariate modeling
frem_sigma Covariate modeling
global_maxeval integer 0 (auto: 30 * (n_params + 1)) Maximum evaluations of the FOCE objective during the global pre-search. Estimation methods and controlling the fit
global_search true, false false Run NLopt CRS2-LM (Controlled Random Search with Local Mutation) as a gradient-free global pre-search before the local optimizer. Estimation methods and controlling the fit
gn_lambda Levenberg-Marquardt damping factor (default 0.01). Larger values make steps more conservative. Estimation methods and controlling the fit
ignore Character vector of filter expressions that exclude a record when the expression evaluates to true. Preparing and checking the analysis dataset
ignore_subjects Preparing and checking the analysis dataset
imp_auto true Adaptive sample count. When true, imp_samples is the starting count and is ramped up (×2/iteration, cap 10000) while the objective’s Monte-Carlo SE exceeds 1.0. Estimation methods and controlling the fit
imp_averaging 50 Terminal iterations averaged into the reported estimate (estimator only). Estimation methods and controlling the fit
imp_defensive_alpha 0.0 Defensive-mixture weight (issue #528), opt-in. Each subject draws this fraction of its samples from the prior N(0, Ω) rather than the mode-centred proposal, and every sample is scored under the mixture density. Estimation methods and controlling the fit
imp_eval_only false true ⇒ evaluate −2 log L at fixed parameters; must be the terminal chain stage. Estimation methods and controlling the fit
imp_iterations 200 MCEM iterations (estimator only). Estimation methods and controlling the fit
imp_low_ess_threshold 0.1 Subjects with normalized ESS below this fraction get flagged in the result. Estimation methods and controlling the fit
imp_proposal_df 5.0 Student-t proposal degrees of freedom (≥ 1), or normal/mvn for a multivariate-normal proposal. Estimation methods and controlling the fit
imp_samples 1000 Importance samples K per subject. 2000–5000 recommended for publication-quality MC SE. Estimation methods and controlling the fit
imp_seed 12345 RNG seed. Same seed → identical result. Estimation methods and controlling the fit
impmap_auto true Adaptive sample count. When true, impmap_samples is the starting count and is ramped up (×2/iteration, cap 10000) while the objective’s Monte-Carlo SE exceeds 1.0. Estimation methods and controlling the fit
impmap_averaging 50 Final iterations whose parameters are averaged into the reported estimate (Monte-Carlo variance reduction). Estimation methods and controlling the fit
impmap_iterations 200 Number of MCEM iterations (parameter updates). Estimation methods and controlling the fit
impmap_low_ess_threshold 0.1 Subjects with normalized ESS below this fraction are flagged as poorly sampled. Estimation methods and controlling the fit
impmap_mceta 0 Number of additional random starting points for per-subject MAP optimization. Estimation methods and controlling the fit
impmap_proposal_df 4 Proposal degrees of freedom. A finite value ≥ 1 gives a heavier-tailed Student-t (default 4); normal (or mvn) gives a multivariate-normal proposal. Estimation methods and controlling the fit
impmap_samples 300 Importance samples K per subject per iteration. Larger K reduces Monte-Carlo noise at linear cost. Estimation methods and controlling the fit
impmap_seed 12345 RNG seed. Same seed → identical estimates. Estimation methods and controlling the fit
impmap_sobol false Use Sobol quasi-random sequences (with Cranley-Patterson randomization) for IS draws instead of pseudo-random. Estimation methods and controlling the fit
impmap_trace false Logical; when TRUE, collect per-iteration parameter values into fit$impmap_trace. Estimation methods and controlling the fit
inits_from_nca true, false, nca, nca_sweep, nca_ebe false Derive NCA-based starting values from the data before the optimizer loop. Initial estimates and a first fit
inner_maxiter integer 200 Max iterations for the inner (per-subject EBE) optimizer Estimation methods and controlling the fit
inner_optimizer auto, bfgs, lbfgs, nelder_mead auto Inner-loop (per-subject EBE) optimisation algorithm. auto uses dense BFGS, switching to limited-memory L-BFGS above 32 random effects. Estimation methods and controlling the fit
inner_restarts integer 1 Guarded multi-start count for the inner (per-subject EBE) optimizer, to escape a multimodal individual objective. Estimation methods and controlling the fit
inner_tol float 1e-5 Gradient-norm convergence tolerance for the inner (per-subject EBE) optimizer. Estimation methods and controlling the fit
iov_column string — Name of the occasion column in the dataset (e.g. OCC). Supplies occasions when the model uses kappa or block_kappa declarations. Variability: random effects, residual error and IOV
iov_occasion column, dose, time(t₁, …) column Derive the IOV occasion partition from the model instead of a data column. Variability: random effects, residual error and IOV
iscale_max 10.0 Maximum proposal scaling factor. Estimation methods and controlling the fit
iscale_min 0.1 Minimum proposal scaling factor for adaptive IS. The IS proposal covariance is multiplied by s² where s is chosen from [iscale_min, iscale_max] to maximise per-subject ESS. Estimation methods and controlling the fit
max_unconverged_frac 0.1 Fraction of subjects (with at least min_obs_for_convergence_check observations) allowed to have unconverged EBEs before the outer optimizer rejects the step (returns OFV = ∞). Estimation methods and controlling the fit
maxiter integer 500 Maximum outer loop iterations. maxiter = 0 is evaluation only: the engine runs one inner EBE solve at the initial parameters and reports the objective there with no outer optimisation — useful for scoring a fixed parameter set or computing standard errors at known estimates (with covariance = true). Estimation methods and controlling the fit
min_obs_for_convergence_check 2 Subjects with fewer than this many observations are excluded from the max_unconverged_frac check (they still run normally). Estimation methods and controlling the fit
mstep_damping 0.03 Exploration-phase cap on the stochastic-approximation step for the numerical θ/σ M-step, the θ-side counterpart of the per-iteration SA step cap SAEM already applies to Ω. Estimation methods and controlling the fit
mu_referencing true, false true Re-centre inner-loop ETA estimates on the current population mean (auto-detected from [individual_parameters]). Variability: random effects, residual error and IOV
multi_start_seed 42 RNG seed for the multi-start theta perturbations. Independent of seed (SAEM) so that changing the SAEM seed does not silently alter which perturbed starting points are used in FOCE multi-start runs. Estimation methods and controlling the fit
n_agq 1 Gauss-Hermite nodes per random effect. 1 reproduces the Laplace approximation exactly; odd values are conventional (they keep a node at the mode). Estimation methods and controlling the fit
n_convergence 250 Phase 2 iterations (step size = 1/k) Estimation methods and controlling the fit
n_exploration 150 Phase 1 iterations (step size = 1) Estimation methods and controlling the fit
n_leapfrog 0 Leapfrog steps per HMC proposal (0 = use MH; see below). When > 0, subjects for which HMC is unavailable (ODE model, missing analytical PK path, non-finite Ω, unsupported TV-cov path) fall back to MH using n_mh_steps proposals. Estimation methods and controlling the fit
n_mh_steps 20 Block Metropolis-Hastings steps per subject per iteration. Also sizes the componentwise decorrelating kernel that prevents block-Ω collapse (max(2, n_mh_steps / n_eta) sweeps; multi-η models only — skipped when n_eta < 2). Estimation methods and controlling the fit
n_starts 1 Number of independent optimization runs. 1 disables multi-start (no behaviour change). Estimation methods and controlling the fit
nn_l2 float ≥ 0 0.0 L2 (weight-decay) strength. Adds nn_l2 · Σ wᵢ² over the network’s weight matrices only (bias terms are left free). Experimental features
nn_smooth float ≥ 0 0.0 Smoothness (curvature) strength. Penalizes the finite-difference 2nd derivative C = f(x+h) − 2·f(x) + f(x−h) of each output along every input’s marginal partial-dependence curve, i.e. nn_smooth · Σ C². Experimental features
npde_nsim integer ≥ 0 0 Number of Monte-Carlo replicates per subject used to compute the simulation-based NPDE/NPD diagnostics after the fit. Diagnosing the model
npde_seed integer — RNG seed for the NPDE/NPD simulation, for reproducible diagnostics. Diagnosing the model
ode_abstol float 1e-6 RK45 ODE solver absolute tolerance (companion to ode_reltol). Structural models: analytical and ODE
ode_auto_switch true, false true Let ode_method = auto change stepper inside an integration segment, not only at its start. Structural models: analytical and ODE
ode_max_steps integer 10000 Max solver steps per integration segment. ODE models and the absorption ODE twin. Structural models: analytical and ODE
ode_method auto, rk45, vern7, rosenbrock23, rodas4, rodas5p auto Which stepper integrates the [odes] block. Two axes: vern7 (Verner 7(6)) buys order, for fits that are accuracy-limited at tight tolerances — not a blanket upgrade, since it is slower than rk45 at default tolerances. Structural models: analytical and ODE
ode_reltol float 1e-4 RK45 ODE solver relative tolerance. Applies to ODE models, and to the auto-generated ODE twin that closed-form transit / inverse-Gaussian absorption models (one_cpt_transit, two_cpt_transit, one_cpt_ig, two_cpt_ig) use to serve IOV, time-varying-covariate, and TIME-switch subjects (#719/#814) — so a call-time override reaches those rerouted fits too; otherwise ignored for analytical PK. Structural models: analytical and ODE
ode_stiff_abort_after integer ≥ 0, or off off Abandon an integration segment once this many of its steps have clamped at the minimum step size, instead of grinding on to ode_max_steps. Structural models: analytical and ODE
omega_burnin 20 Initial exploration iterations during which Ω (and ΩIOV) are held at their starting values while the MH chain warms up. Estimation methods and controlling the fit
optimizer auto, bobyqa, slsqp, nlopt_lbfgs, mma, trust_region (plus deprecated aliases bfgs/lbfgs → nlopt_lbfgs) auto Outer-loop optimisation algorithm. Applies to method = foce / focei and to the FOCEI polish phase of method = gn_hybrid. Estimation methods and controlling the fit
optimizer_trace true, false false Write a per-iteration CSV to /tmp/ferx_trace_<pid>_<ts>.csv. Estimation methods and controlling the fit
outer_ftol float auto Relative objective tolerance: the relative OFV change below which the optimizer stops. Estimation methods and controlling the fit
outer_xtol float 1e-4 Relative step tolerance: how far the optimizer’s step must shrink before it declares success. Estimation methods and controlling the fit
parameter_scaling auto, none, abs, rescale2 auto Parameter-scaling strategy for the outer optimizer (supersedes scale_params when non-none). Variability: random effects, residual error and IOV
reconverge_gradient_interval integer ≥ 0 0 How often to re-solve each subject’s inner EBE loop during the population gradient instead of holding the EBEs (η̂) and FOCE Hessian fixed. Estimation methods and controlling the fit
report_final_gradient true, false true Compute a finite-difference gradient at the reported estimates when the optimizer supplied none of its own, and report it as final_gradient with final_gradient_source = "finite_difference". Estimation methods and controlling the fit
scale_params false Legacy boolean alias for parameter_scaling = abs. Divide each packed (log/Cholesky) coordinate by its initial magnitude before passing it to the optimizer. Variability: random effects, residual error and IOV
seed 12345 RNG seed for reproducibility Estimation methods and controlling the fit
sir_df 5.0 Degrees of freedom for the Student-t proposal; higher values approach a normal proposal Parameter uncertainty
sir_keep_samples false Retain resampled parameter vectors for simulate_with_uncertainty() Parameter uncertainty
sir_resamples 250 Number of resampled vectors (m) Parameter uncertainty
sir_samples 1000 Number of proposal samples (M) Parameter uncertainty
sir_seed 12345 RNG seed for reproducibility Parameter uncertainty
stagnation_guard true Short-circuit the NLopt-based outer optimizers once recent evals show no OFV improvement above 1e-3 over a window of 3*(n+1).max(50) evals. Estimation methods and controlling the fit
start_sigma 0.3 Log-space perturbation applied to initial theta values for starts 1..n. Estimation methods and controlling the fit
steihaug_max_iters integer adaptive Max CG iterations for the Steihaug subproblem (only used when optimizer = trust_region). Estimation methods and controlling the fit
vi_avg_last final 25% Polyak averaging window, in iterations — the reported estimate is the mean over the final window rather than the last iterate. Estimation methods and controlling the fit
vi_eta_grad auto auto uses the analytic Dual2 η-gradient where available and central finite differences where not; analytic and fd pin one route. Estimation methods and controlling the fit
vi_family full_rank full_rank fits a full posterior covariance per subject; mean_field fits a diagonal one — O(d) rather than O(d²). Estimation methods and controlling the fit
vi_final_ofv none none leaves ofv as NaN, because the ELBO is a lower bound and is not comparable with a FOCEI OFV; laplace computes a comparable one. Estimation methods and controlling the fit
vi_grad_clip 1e4 Global-L2 gradient clip applied to every Adam step; 0 disables it. Estimation methods and controlling the fit
vi_iters 25000 Adam ceiling, not a fixed budget — the run stops early once the objective and the estimates have both settled. Estimation methods and controlling the fit
vi_kl analytic How the KL(q ‖ N(0, Ω)) half is evaluated — analytic in closed form (only the data term is sampled) or mc. Estimation methods and controlling the fit
vi_lr 0.02 Adam learning rate. Lower it if the trace oscillates, or if σ settles above a FOCEI/AGQ fit of the same data. Estimation methods and controlling the fit
vi_mc_samples 32 Monte-Carlo draws per subject per iteration. This sets the noise floor the settling test measures against, so it decides when the run stops as well as how noisy each step is; too few draws can settle early at the wrong answer. Estimation methods and controlling the fit
vi_omega_update closed_form closed_form sets Ω to its exact ELBO maximizer each iteration, keeping it out of the stochastic optimization; adam learns it with everything else. Estimation methods and controlling the fit
vi_seed 20240704 Seed for the common random numbers. See Reproducibility. Estimation methods and controlling the fit
vi_sigma_update closed_form As vi_omega_update, for the residual error σ. See How σ is updated. Estimation methods and controlling the fit

Model file blocks

The blocks a .ferx model file can contain. Required and Purpose are the ferx-core block overview at the pinned engine, and are blank for a block that overview does not list; the chapter column covers those. Block names are closed-world, so a header outside this table is an error.

Block Required Purpose Chapter ferx-core page
[adaptive_dosing] No Feedback / TDM dose controller for simulate() Adaptive dosing and TDM strategies adaptive-dosing
[binary_model] No Binary / logistic endpoint (needs --features survival) Binary endpoints categorical
[covariate_model] Covariate modeling covariate-model
[covariate_nn NAME] No Neural-network covariate model (needs --features nn) Experimental features covariate-nn
[covariates] No Declare which data columns are covariates (and how they interpolate) Covariate modeling covariates
[data] No Point at the dataset CSV; overridden by an explicit CLI/R path Preparing and checking the analysis dataset data
[data_selection] No Row/subject filters applied to the dataset Preparing and checking the analysis dataset data-selection
[derived] No Post-hoc derived quantities written to sdtab Tables and figures derived
[diffusion] No SDE diffusion terms Experimental features diffusion
[error_model] Yes Define the residual error model Writing and managing model files error-model
[event_model] No Time-to-event endpoint (needs --features survival) Time-to-event models event-model
[fit_options] No Configure estimation method and optimizer Writing and managing model files fit-options
[individual_parameters] Yes Map population parameters to individual PK parameters Writing and managing model files individual-parameters
[initial_conditions] No Non-zero compartment initial amounts Structural models: analytical and ODE initial-conditions
[markov_model] No Continuous-time Markov endpoint (needs --features markov) Function, option and example index markov-model
[mixture] No Mixture (subpopulation) model Variability: random effects, residual error and IOV mixture
[odes] If ODE ODE right-hand-side equations Structural models: analytical and ODE ode-models
[output] No Extra sdtab output columns Tables and figures output
[parameters] Yes Define theta, omega, and sigma parameters Writing and managing model files parameters
[priors] Experimental features priors
[scaling] No Compartment scaling / observation readouts Structural models: analytical and ODE scaling
[simulation] No Define a simulation trial design Simulating scenarios simulation
[structural_model] Yes Specify the PK model (analytical or ODE) Writing and managing model files structural-model

Data columns

Columns the ferx data format recognises. Type and Meaning are taken from the ferx-core data format page at the pinned engine, and are blank for the columns that page does not list; the chapter column covers those.

Column Type Meaning Chapter
ADDL Preparing and checking the analysis dataset
AMT numeric Dose amount (for EVID=1/EVID=4; also the dose-inference signal when EVID is absent) Preparing and checking the analysis dataset
CENS integer Censoring flag. 1 = below LLOQ and DV carries the LLOQ; -1 = above ULOQ and DV carries the ULOQ; 0 = quantified. Preparing and checking the analysis dataset
CMT integer Compartment number (1-indexed) Preparing and checking the analysis dataset
DV numeric Dependent variable (observed concentration) Preparing and checking the analysis dataset
EVID integer Event ID: 0 = observation, 1 = dose, 2 = other event, 3 = system reset, 4 = reset + dose. Preparing and checking the analysis dataset
FREMTYPE Covariate modeling
ID string/numeric Subject identifier Preparing and checking the analysis dataset
II numeric Interdose interval for repeated dosing Preparing and checking the analysis dataset
MDV integer Missing DV flag. 1 = DV should be ignored (row excluded from the likelihood) Preparing and checking the analysis dataset
RATE numeric Infusion rate. 0 = bolus, >0 = constant-rate infusion (duration = AMT/RATE). Preparing and checking the analysis dataset
SS integer Steady-state flag. 1 = assume steady state Preparing and checking the analysis dataset
TENTRY Time-to-event models
TIME numeric Observation/event time on the data clock Preparing and checking the analysis dataset

Bundled examples

Every example is available with ferx_example() and its name, which returns the paths of its model and data (and $search for a search configuration).

Example Chapter
adaptive_tdm Adaptive dosing and TDM strategies
adaptive_vanco_loading Adaptive dosing and TDM strategies
binary_logistic Binary endpoints
bioavailability Absorption and bioavailability
bioavailability_ode Absorption and bioavailability
biphasic_igd_absorption Absorption and bioavailability
emax_pkpd PK/PD and multiple endpoints
emax_timecourse PK/PD and multiple endpoints
igd_inverse_gaussian Absorption and bioavailability
infusion_absorption Dosing regimens and exposure metrics
mixed_absorption Absorption and bioavailability
mm_multistart Estimation methods and controlling the fit
mm_oral Structural models: analytical and ODE
one_cpt_ig Absorption and bioavailability
one_cpt_iv Structural models: analytical and ODE
one_cpt_iv_ode Structural models: analytical and ODE
one_cpt_iv_pooled Structural models: analytical and ODE
one_cpt_transit Absorption and bioavailability
one_cpt_transit_iov Variability: random effects, residual error and IOV
parallel_absorption Absorption and bioavailability
per_route_lag_absorption Absorption and bioavailability
pktte_joint Time-to-event models
sequential_absorption Absorption and bioavailability
ss_absorption Dosing regimens and exposure metrics
three_cpt_iv Structural models: analytical and ODE
three_cpt_iv_ode Structural models: analytical and ODE
three_cpt_oral Structural models: analytical and ODE
three_cpt_oral_ode Structural models: analytical and ODE
transit_2cpt Absorption and bioavailability
transit_savic Absorption and bioavailability
tte_competing_risks Time-to-event models
tte_exponential Time-to-event models
tte_gompertz Time-to-event models
tte_weibull Time-to-event models
two_cpt_ig Absorption and bioavailability
two_cpt_iv Structural models: analytical and ODE
two_cpt_iv_ode Structural models: analytical and ODE
two_cpt_oral_base Writing and managing model files
two_cpt_oral_cov Preparing and checking the analysis dataset
two_cpt_oral_cov_ode Structural models: analytical and ODE
two_cpt_oral_cov_ode_template Structural models: analytical and ODE
two_cpt_oral_derived Tables and figures
two_cpt_oral_global Model development and selection
two_cpt_transit Absorption and bioavailability
warfarin A complete analysis in one chapter
warfarin_additive_eta Variability: random effects, residual error and IOV
warfarin_addl Dosing regimens and exposure metrics
warfarin_amd Model development and selection
warfarin_block_omega Variability: random effects, residual error and IOV
warfarin_bloq Censored observations (BLOQ)
warfarin_data_selection Preparing and checking the analysis dataset
warfarin_dcm Experimental features
warfarin_derived Dosing regimens and exposure metrics
warfarin_derived_pkpd PK/PD and multiple endpoints
warfarin_if Covariate modeling
warfarin_iov Variability: random effects, residual error and IOV
warfarin_iov_saem Variability: random effects, residual error and IOV
warfarin_logit_f Absorption and bioavailability
warfarin_ltbs Variability: random effects, residual error and IOV
warfarin_ode Structural models: analytical and ODE
warfarin_ode_lagtime Absorption and bioavailability
warfarin_ode_time Structural models: analytical and ODE
warfarin_saem Estimation methods and controlling the fit
warfarin_scaled Structural models: analytical and ODE
warfarin_sde Experimental features
warfarin_ss Dosing regimens and exposure metrics
weibull_absorption Absorption and bioavailability
zero_order_absorption Absorption and bioavailability

Search configurations

Example with $search Chapter
one_cpt_transit Model development and selection
two_cpt_oral_base Model development and selection
two_cpt_oral_cov Model development and selection
two_cpt_oral_global Model development and selection
warfarin Model development and selection
warfarin_amd Model development and selection
warfarin_block_omega Model development and selection
warfarin_iov Model development and selection

Warning categories

Categories of ferx_get_warnings(fit, as_df = TRUE)$category, collected by a fit that ran, with the severity and meaning ferx-core gives them at the pinned engine. Critical means the result is untrustworthy as it stands; Warning means it stands with a caveat; Info implies no action. A model that never ran fails with a check report code instead, listed under Check report codes below. Each chapter’s Warnings you may see here section covers the ones it meets, and the ferx-core warnings page describes them all.

Category Severity Meaning Chapter
absorption_twin_declined Warning An analytic transit / inverse-Gaussian model’s ODE twin could not be built, so the model keeps no ODE fallback (#1008). Absorption and bioavailability
bloq_method Warning BLOQ / M3 censoring caveat. Censored observations (BLOQ)
boundary_estimate Warning One or more THETA estimates are pinned to an optimizer bound. Diagnosing the model
cancelled Info Run cancelled by the user. Estimation methods and controlling the fit
condition_number Critical Ill-conditioned covariance / high condition number. Diagnosing the model
convergence Critical Optimizer did not converge, or (W_NONFINITE_OBJECTIVE) the objective at the final estimates is NaN, infinite, or the clamped divergence sentinel. Initial estimates and a first fit
covariance_failed Critical Covariance step failed — no standard errors. Parameter uncertainty
covariance_regularized Warning Covariance step succeeded but was regularized / degraded. Parameter uncertainty
covariance_step Info Covariance-step informational note (e.g. evaluation cost). Parameter uncertainty
data_quality Warning Dataset issue (missing DV, ADDL/II, non-positive DV, …). Preparing and checking the analysis dataset
dw_autocorrelation Warning IWRES autocorrelation (Durbin–Watson out of range). Diagnosing the model
ebe_start_dependent Warning (W_EBE_START_DEPENDENT) The empirical Bayes estimates at the final parameters depend on where the inner loop starts: re-solving them cold scores materially worse than the EBEs the optimizer minimised against, or returns a non-finite objective (#833). Estimation methods and controlling the fit
eps_shrinkage Warning Residual (EPS) shrinkage high / negative. Diagnosing the model
eta_normality Warning ETA departs from normality. Diagnosing the model
eta_shrinkage Warning One or more ETA shrinkages exceed ~30%. Diagnosing the model
experimental Warning An experimental feature (SDE, neural-network) was used. Experimental features
flat_parameter Warning A non-fixed THETA has an ≈ 0 outer gradient at the initial estimate — it never reaches the objective (unmapped, or dropped from the structural / scaling model). Estimation methods and controlling the fit
flip_flop Warning A transit / inverse-Gaussian absorption closed form entered the flip-flop regime (disposition rate ≥ the tilting abscissa). Absorption and bioavailability
general Warning Unrecognised message (fallback bucket). Initial estimates and a first fit
gradient_fallback Info A gradient / sampler fallback was taken. Estimation methods and controlling the fit
high_correlation Warning One or more THETA (fixed-effect) pairs have |correlation| ≥ 0.95. Diagnosing the model
importance_sampling Warning ESS = 0 / proposal collapse. Estimation methods and controlling the fit
inflated_rse Warning One or more THETA estimates have RSE > ~50%. Diagnosing the model
init_outside_bounds Warning An initial estimate packs outside one of ferx’s internal rails (the hidden 1e9 THETA cap, the OMEGA ±6 / off-diagonal ±10 guards, the SIGMA [-8, 5] guard) and was clamped there before the first objective evaluation. Estimation methods and controlling the fit
mu_referencing Warning / Info Missing or partial mu-referencing. Estimation methods and controlling the fit
multi_start Info Multi-start note. Estimation methods and controlling the fit
ode_solver Warning / Info The ODE solver’s own health at the final estimates (#1080). Warning when steps clamped at the minimum step size (a stability-limited segment whose un-integrated tail is freeze-padded), when a segment stopped before its requested end, when ode_stiff_abort_after cut segments short, or when ode_method = auto discarded an escalation and re-solved it explicitly — including when only its analytic derivatives overflowed, its values staying finite — and when that re-solve failed too. Structural models: analytical and ODE
omega_structure Warning Mixed lognormal / additive block in omega. Variability: random effects, residual error and IOV
optimizer_config Warning / Info global_search config note or failure. Estimation methods and controlling the fit
optimizer_health Warning Trust-radius collapse / degeneracy. Estimation methods and controlling the fit
parameter_at_runaway_guard Critical / Warning A free coordinate is pinned to a hidden optimizer guard (implicit THETA cap, OMEGA / SIGMA rail), with a verdict the side does not decide. Estimation methods and controlling the fit
simulation Warning A simulated subject was handled specially — a degenerate hazard draw (censored, no event) or an over-large recurrent-event stream (skipped/truncated). Time-to-event models
sir Warning SIR failed or was requested without a covariance. Parameter uncertainty
stalled_at_init Warning The fit never left its initial estimates — no free THETA, OMEGA or SIGMA coordinate moved, so the reported objective is the objective of the initial values and carries no information about the model. Estimation methods and controlling the fit
threads Info Thread-count efficiency note. Estimation methods and controlling the fit
vi_bad_basin Critical VI’s final ELBO tightness check found that a flat objective is an unusable variational bound, not convergence. Estimation methods and controlling the fit

Check report codes

Stable identifiers from the model file parser and the pre-fit checks: E_* stops the model from running, W_* is a check-time note that does not. ferx_model_validate() returns them in $diagnostics, with the severity, block and line (Writing and managing model files). A refused ferx_fit() raises a condition of class ferx_engine_error that carries the same identifier as $code, with $block, $line and $suggestion where the engine knows them (NA otherwise), and appends the code to the message in square brackets, so a script can branch on it with tryCatch(..., ferx_engine_error = function(e) e$code). These are a different channel from the Warning categories above, which a completed fit collects in fit$warnings. The 49 codes below (31 errors, 18 warnings) are the check report of the pinned engine, one sentence each; the ferx-core check report page gives the full text.

Code Severity Meaning
E_BLOCK_FEATURE_DISABLED error A recognised block needs a cargo feature this binary was not built with — [event_model] / [binary_model] need --features survival, [markov_model] needs --features markov.
E_BLOCK_INSTANCE_NAME error A [block NAME] instance name is given for a block that takes none (e.g. [fit_options DOSE]), or omitted for one that requires it ([covariate_nn NAME]).
E_BLOCK_VARIANCE_ONLY error A scale tag ((sd), (variance) or (var)) on a block_omega, block_sigma or block_kappa declaration.
E_DATA error The --data file could not be read or parsed.
E_DEPRECATED_BLOCK error A [block] that was ferx syntax and is no longer read — currently [initial_values], whose contents moved inline into [parameters].
E_DERIVED_NAME_CONFLICT error A [derived] name clashes with a built-in sdtab column, theta, eta, or individual-parameter name.
E_DOSE_ATTR_DOUBLE_USE error A dose attribute the engine applies at the dose event is also read by the model, so its value is applied twice.
E_DOSE_ATTR_NONFINITE error A dose attribute the engine applies at the dose event — lag time (lagtime / ALAG{n}), bioavailability (F / F{n}), or a modeled infusion duration D{n} / rate R{n} behind a coded RATE — is NaN or infinite at typical values for some subject.
E_ENDPOINT_NO_RECORDS error A declared non-Gaussian endpoint has no row routed to it anywhere in the data — typically the CMT column is missing, so every row reads as CMT 1.
E_ENDPOINT_UNROUTED error A compartment the model declares as a non-Gaussian endpoint ([event_model], [binary_model], Markov) carries Gaussian observations: the population was read without endpoint routing, so the endpoint’s rows would be scored as concentrations and its likelihood would contribute nothing.
E_ETA_NOT_DECLARED error An unresolved identifier reads as a random effect (ETA… / KAPPA…) but no omega / kappa declaration defines it, and the data carries no such column.
E_IMP_CHAIN error imp is mis-placed in a method chain — repeated, or (with imp_eval_only = true) not the terminal stage.
E_INIT_BOUNDS_INVERTED error A coordinate whose packed box is empty, so no start can be placed in it at all.
E_IOV_MISSING_OCC error Model declares kappa (IOV) parameters but no occasion labels were found in the dataset.
E_METHOD_NO_RANDOM_EFFECTS error method = imp, impmap or bayes (anywhere in a method chain) on a model with no random effects (n_eta = 0).
E_MISSING_BLOCK error A required [block] is absent. block names which one.
E_MISSING_COVARIATE error The model references a covariate not present in the data (case-sensitive).
E_NN_FEATURE_DISABLED error A [covariate_nn] block requires building with --features nn.
E_NONFINITE_DV error A subject carries a non-finite (NaN/Inf) observation. Usually a population read by read_population_for_simulation() — a simulation input — passed to fit().
E_OMEGA_INIT_AT_RAIL error A free omega / kappa / [mixture] omega(k) variance whose initial value packs onto the optimizer’s -6 lower rail — every variance ≤ 6.1e-6, and ~ 0.0 in particular (a declared zero is regularised to 1e-8, packing to ln(L) = -9.21).
E_OPTIMIZER_AGQ error optimizer = trust_region used with a quadrature stage (method = laplace, or method = focei with n_agq > 1).
E_OPTIMIZER_IOV error optimizer = trust_region used with an IOV model (n_kappa > 0).
E_OUTPUT_UNKNOWN_COLUMN error A name in [output] is not recognised as a covariate, individual parameter, or derived expression.
E_PARSE error The model file failed to parse (catch-all for parser errors).
E_PER_CMT_ERROR_MODEL error An observed compartment lacks a per-CMT [error_model] entry.
E_PER_CMT_SCALING error An observed compartment lacks a per-CMT scaling entry.
E_SAEM_NO_RANDOM_EFFECTS error method = saem (anywhere in a method chain) on a model with no random effects (n_eta = 0).
E_SDE_INCOMPATIBLE error An SDE ([diffusion]) model used with an incompatible method (saem, gn, gn_hybrid) or gradient setting.
E_SIGMA_ORDER_MISMATCH error A single-endpoint [error_model] names its sigmas in an order other than the [parameters] declaration order.
E_THETA_INIT_OUTSIDE_BOUNDS error A theta whose initial value is strictly outside its own declared range. The optimizer clamps the start into its box, so theta TVCL(0.05, 0.1, 10.0) fits from 0.1 — a factor of two — silently, on every run.
E_UNKNOWN_BLOCK error A [block] header is not a recognised block name. The message lists every offending header with its line, the valid set this build accepts, and a did-you-mean when there is a near match; suggestion carries the near match on its own.
W_ABSORPTION_TWIN_DECLINED warning An analytic transit / inverse-Gaussian model’s ODE twin could not be built, so the model stays closed-form with no ODE fallback.
W_ADDL_MISSING_II warning ADDL > 0 on a dose row but II is zero or missing; additional doses were not expanded.
W_DERIVED_COVARIATE_SHADOW warning A [derived] name shadows a covariate (allowed but may be confusing).
W_DERIVED_STEP_IGNORED warning step= given for a DV-based integral (ignored; DV integrals always use observation times).
W_DESIGN_DV warning Simulation reader only: one or more EVID=0 rows had a missing DV and were kept as design points to simulate at, so the dataset contributes more rows than a fit of the same file would.
W_ETA_NOT_DECLARED warning As E_ETA_NOT_DECLARED, but reported without --data, where ferx cannot yet know whether the dataset supplies the column.
W_EXPERIMENTAL_NN warning The model uses neural-network components ([covariate_nn]), an experimental feature.
W_EXPERIMENTAL_SDE warning The model uses stochastic differential equations ([diffusion]), an experimental feature.
W_GN_NO_RANDOM_EFFECTS warning method = gn as the last estimating stage on a model with no random effects (n_eta = 0).
W_INIT_OUTSIDE_BOUNDS warning An initial estimate strictly outside one of ferx’s internal rails rather than a declared bound: the hidden 1e9 θ cap, the Ω ±6 (variance ≤ 1.6e5) / off-diagonal ±10 guards, or the Σ [-8, 5] guard.
W_IOV_OCC_MISSING warning Some rows in the IOV occasion column had missing or unparseable values; those rows were assigned occasion=0.
W_MISSING_DV warning One or more EVID=0 rows had a missing DV (./NA/blank) but were not marked MDV=1; they were skipped rather than scored as DV=0.
W_NEGATIVE_LAGTIME warning Lag time is negative at the initial typical-value point.
W_OUTPUT_DUPLICATE warning A name in [output] is already written to sdtab automatically (e.g. TAFD, TAD, an eta name).
W_SDE_RESET warning EVID=3/4 resets under an SDE [diffusion] model are not honoured.
W_STEADY_STATE_ABSOLUTE_TIME warning An SS=1 dose (II > 0) on a model whose [odes] right-hand side reads an absolute clock — TAFD, T/t, or the bare TIME built-in.
W_STEADY_STATE_II warning SS=1 doses with missing / non-positive II (treated as non-SS).
W_STEADY_STATE_INFUSION warning SS=1 infusion whose length after bioavailability exceeds II (overlapping pulses; SS skipped) — the run-in’s own test (#1281).

Fit object slots

Elements of the list ferx_fit() returns, for a fit of the warfarin example. Some slots are NULL unless the corresponding step or model feature is used. Descriptions are the first sentence of the entry in ?ferx_fit, where it has one.

Slot Description
aic Akaike Information Criterion
bayes
bic Bayesian Information Criterion
bic_inputs Named list of the free-parameter tally by Delattre class - n_obs, theta_random, theta_fixed, omega, kappa, sigma, sigma_random - which ferx_bic turns into the mixed / IIV / random BIC variants.
bloq_method_label Character string describing the LOQ-censoring handling method used (“m3”, “drop”, etc.).
call_settings Named list of the effective settings passed to Rust, with values typed back to their natural R types (logical, numeric, or character).
cond_dist
condition_number Ratio of the largest to smallest eigenvalue of the correlation matrix of estimated parameters.
converged Logical; did the optimizer converge
cor_matrix Correlation matrix derived from cov_matrix, same dimnames. A correlation close to between two parameters flags a structural identifiability problem in the model.
cov_matrix Full parameter covariance matrix as a named numeric matrix (params × params). Row/column names use declared variable names (“TVCL”, “ETA_CL”, “EPS_PROP”); fallback is “OMEGA(1,1)” / “SIGMA(1)”.
covariance_n_evals_estimated Estimated number of OFV calls required for the covariance step, computed before the step runs on large models.
covariance_status String: “computed”, “failed”, “not_requested”, or “sir_fallback” (the finite-difference Hessian was not positive definite and covariance_fallback = “sir” produced SIR-based intervals).
covariate_names Character vector of non-standard column names present in the dataset (beyond ID, TIME, DV, EVID, AMT, CMT, RATE, MDV, II, SS, CENS, OCC).
covariate_types Named character vector mapping each declared covariate to its type, “continuous” or “categorical” (the type from the [covariates] block).
covtab Data frame echoing the declared covariate columns, present only when the model has a [covariates] block.
data_hash
data_name Dataset name, derived as the basename of the data path with its extension stripped.
data_path
dw_statistic Pooled Durbin-Watson statistic for IWRES within subjects. 2.0 = no autocorrelation; < 1.5 = positive autocorrelation (possible missing dynamics); > 2.5 = negative autocorrelation (possible over-parameterisation).
ebe_convergence_warnings Number of outer iterations in which too many EBEs were unconverged (step was rejected by the guard).
ebe_etas Data frame with one row per subject containing the BSV empirical Bayes estimates: ID plus one column per eta named after the model’s eta declarations (e.g. ETA_CL, ETA_V).
eigenvalues Numeric vector of eigenvalues of the correlation matrix of estimated (non-fixed) parameters, sorted descending.
estimate_near_boundary TRUE when a theta is pinned to a declared bound - the predicate ferx_bootstrap applies as skip_estimate_near_boundary.
estimates Tidy data frame of all estimated parameters (theta, omega diagonal, sigma, and - for IOV models - kappa diagonal), with columns param, transform, estimate, se, rse_pct, lower_95, upper_95, estimate_natural, lower_95_natural, upper_95_natural, init_as_sd, weight.
eta_linked_theta
eta_log_transformed Logical vector of length n_eta; TRUE when the eta is lognormally parameterised (THETA * exp(ETA)), FALSE for additive or unknown parameterisations.
eta_names Character vector of ETA parameter names as declared in the model file (e.g. “ETA_CL”, “ETA_V”).
eta_normality Data frame with Shapiro-Wilk normality test for each ETA: columns eta, W, p_val, flag.
eta_param_types
exclusions Named list summarising records excluded by [data_selection] rules (model file and/or ignore/ accept/ignore_ids arguments).
ferx_version ferx-core library version string.
final_gradient Numeric vector containing the gradient of the objective function at the best-OFV parameter point (packed space: log-theta, Cholesky-omega, log-sigma).
gradient The inner-loop gradient method as requested by the caller (usually “auto” or “fd”).
gradient_method_inner Engine label for the inner-loop gradient method. Prefer gradient_used for display.
gradient_method_outer Engine label for the population-level optimizer’s gradient method.
gradient_used The inner-loop gradient method the engine actually used: “analytic”, “fd”, or “N/A” (derivative-free / sampling step).
imp_seed Numeric scalar (or NULL) giving the importance sampling seed. NULL when IS was not run.
impmap_trace
importance_sampling Importance-sampling marginal log-likelihood diagnostics, populated only when the method chain ends with an “imp” stage (NULL otherwise).
individual_estimates Data frame with one row per subject containing each subject’s individual parameter values: ID plus one column per parameter declared in the [individual_parameters] block (e.g. CL, V, KA).
inits_from_nca Character string giving the NCA initialisation method used (“nca”, “nca_sweep”, or “nca_ebe”), or NULL when model-file initial values were used directly.
input_columns Includes both standard columns (ID, TIME, DV, etc.) and any covariate columns. Empty for in-memory fits that never read a file and absent after a ferx_save_fit/ferx_load_fit round-trip on older bundles.
iwres_lag1_r Pooled lag-1 Pearson correlation of IWRES within subjects. Positive values indicate under-fitting, negative values indicate over-fitting.
kappa_init_as_sd Logical vector, one entry per IOV kappa parameter. Same semantics as omega_init_as_sd for inter-occasion variability.
kappa_is_diagonal The same flag for the IOV (KAPPA) block; NA when the model declares no IOV.
left_init The outer optimizer’s own verdict on whether it left the initial estimates: TRUE, FALSE, or NA when the method recorded none.
max_abs_correlation Largest absolute off-diagonal of the covariance matrix in correlation form, on the natural theta / OMEGA / SIGMA scale.
max_unconverged_subjects Worst-case number of unconverged subjects in a single outer iteration.
method Estimation method used
method_chain
model_file_settings Named list of raw key = value pairs from the model file’s [fit_options] block, as character strings (before Rust type coercion).
model_hash
model_name Model name declared in the .ferx file by a top-level model <name> line (outside any [block], e.g. model warfarin_pk); the name is a single word.
model_path
model_source
model_structure Named list returned by the Rust engine, derived from the parsed CompiledModel so it reflects exactly what ferx-core ran.
model_text Verbatim content of the .ferx model file as a character string. NULL for in-memory fits that were never associated with a file, or for fits produced by older engine versions.
multi_start_seed Numeric scalar (or NULL) giving the random seed used for multi-start parameter perturbation.
n_iterations Number of outer iterations run
n_obs
n_parameters
n_starts Integer. Number of multi-start runs attempted. 1 for single-start fits.
n_subjects
n_threads_used Integer. Actual number of parallel threads used by the engine during fitting.
neural_networks Named list of sub-lists, one per [covariate_nn] block declared in the model file.
nlopt_missing_algorithms Character vector of NLopt algorithm names that are not available in the current build (empty on most platforms).
obs_time_range Length-2 numeric vector c(min_time, max_time) across all observation records, or NULL when there are no observations.
ofv Objective function value (-2 log-likelihood). The penalized objective when the model declares a prior(…) on any parameter, i.e. ofv_data + ofv_prior.
ofv_data The data half of ofv - the -2 log-likelihood the AIC and BIC are computed from, and the value to compare against an unpriored fit of the same model.
ofv_prior The prior half of ofv: the penalty summed over the priored coordinates. Exactly 0 when no prior is declared.
omega Between-subject variability covariance matrix. Row and column names are the declared ETA names (e.g. “ETA_CL”); fallback is “OMEGA(1,1)” when names are absent.
omega_init Initial omega variance matrix, same layout as omega. A zero matrix for in-memory fits and older bundles.
omega_init_as_sd Logical vector, one entry per BSV eta. TRUE when the corresponding omega line in the model file was annotated with (sd), meaning the initial value was specified as a standard deviation rather than a variance. print.ferx_fit() appends [initial specified as SD] to those rows.
omega_init_dim Number of rows/columns of omega_init.
omega_is_diagonal TRUE when the OMEGA block the fit was estimated under is diagonal, FALSE for a block_omega model, NA when the engine recorded no layout.
optimizer_label Human-readable label for the outer optimizer used (e.g. “LBFGS”, “BOBYQA”). Mirrors the optimizer enum value from ferx-core.
outer_gtol Numeric. Gradient tolerance passed to the outer optimizer.
outer_maxiter Integer. Maximum number of outer-loop iterations passed to the optimizer.
prior_summary Per-parameter prior report, or NULL when the model declares no prior. One row per priored parameter with columns name, prior_value, estimate, shift_in_prior_sds (signed, in prior SDs), penalty (this parameter’s contribution to ofv_prior), family (“lognormal” or “normal”, decided by the parameter’s declared lower bound), and the implied 95% prior interval prior_lower_95 / prior_upper_95.
saem_mu_ref_m_step_evals_saved Number of OFV evaluations saved by mu-referencing in the SAEM M-step. Only populated for SAEM fits with mu_referencing = TRUE; NULL otherwise.
saem_n_subjects_hmc Integer count of subjects whose SAEM E-step proposals were generated by HMC (i.e. n_leapfrog > 0 and the AD build is active).
saem_seed Numeric scalar (or NULL) giving the SAEM stochastic seed. NULL for non-SAEM methods.
sdtab Data frame with ID, TIME, DV, PRED, IPRED, CWRES, IWRES, EBE_OFV, N_OBS; OCC if any subject carries an occasion column; CENS if any rows are LOQ-censored; CMT if the dataset has more than one endpoint (any observation with CMT != 1).
se_omega Standard errors for omega elements. For diagonal omega, a vector of length n_eta (one per variance).
se_sigma Standard errors for sigma (on the SD scale, like sigma itself)
se_theta Standard errors for theta (NULL if covariance step failed)
shrinkage_eps EPS shrinkage: 1 - SD(IWRES). NA when fewer than 2 valid residuals.
shrinkage_eta Numeric vector of ETA shrinkage per random effect (1 - SD(eta_hat_k) / sqrt(omega_kk)).
sigma Residual error parameter estimates on the standard-deviation scale. For a proportional component CV% = sigma * 100; for an additive component the value is in observation units.
sigma_init Numeric vector of initial sigma values, parallel to sigma and sigma_names.
sigma_init_as_sd Logical vector, one entry per sigma component. Same semantics as omega_init_as_sd for residual-error parameters.
sigma_names Names of the sigma parameters as declared in the [parameters] block of the .ferx file.
sigma_types Per-component error type label, parallel to sigma: “proportional” or “additive”.
sir_resamples
sir_resamples_dim
sir_resamples_n
sir_seed_used Numeric scalar (or NULL) giving the SIR resampling seed. NULL when SIR was not run.
stalled_at_init TRUE when no free parameter moved more than 1% of its initial value, when the fit carries nothing to judge by.
theta Named numeric vector of fixed effect estimates
theta_init Numeric vector of initial theta values as supplied to the optimizer, parallel to theta and theta_names.
theta_transforms
total_ebe_fallbacks Total Nelder-Mead fallback invocations across all subjects and iterations.
uses_sde Logical; TRUE when the model file contained a [diffusion] block and the fit used the Extended Kalman Filter (EKF) likelihood.
wall_time_secs Total wall-clock time for the fit in seconds.
warnings Character vector of warnings
warnings_category
warnings_message
warnings_severity
warnings_source_method
warnings_structured Data frame with columns severity (“critical”, “warning”, or “info”), category (a fixed vocabulary such as “convergence”, “covariance_step”, “dw_autocorrelation”), message, and source_method (the estimation stage that emitted the warning, e.g. “FOCEI”; empty string when not applicable).

Not available from R

Features documented for ferx-core that the pinned ferx-r build cannot run, or runs only partly:

Feature Status at the pinned build Where to look
Variational inference as ferx_fit(method = "vi") The method argument rejects it; method = vi in [fit_options] runs Estimation methods and controlling the fit
[markov_model] (continuous-time Markov endpoints) Rejected at parse time: ferx-r does not build the engine’s markov feature Markov models
[simulation] block Read by the ferx-core command line only; ferx-r’s simulation functions need a dataset Simulating scenarios
[dynamics_nn] (neural-network ODE terms) Not implemented (design only) Neural networks
Hand-written [covariate_model] relations, repeated time-to-event, fixed-rate infusions into the central compartment Fit from R, but no bundled ferx-r example Covariate modeling, Time-to-event models, Dosing regimens and exposure metrics
[mixture] models, modelled infusion rate or duration (RATE = -1, -2) No bundled example Variability: random effects, residual error and IOV, data format
VI’s ELBO and per-subject posterior summaries Not on the R fit object Variational inference

Feature maturity

The maturity label of each ferx-core feature at the pinned engine (ferx-core d66046e). stable features are well tested across datasets and estimation options; beta features are stable in limited testing; experimental features have been tested on a few examples and may change. See the ferx-core feature maturity page.

Feature Maturity ferx-core page
Parameters (theta / omega / sigma, block omega) stable Parameters
Inter-occasion variability (IOV) stable IOV
Covariates stable Covariates
Structural model — analytical PK (1/2/3-cpt) stable Structural Model
Lag time stable Lagtime
Steady-state doses (SS) stable Steady-State Doses
Multiple dosing (ADDL / II) stable Multiple Dosing
Error model (additive / proportional / combined) stable Error Model
Simulation stable Simulation
Individual parameters DSL beta Individual Parameters
BLOQ / censored observations (M3) beta BLOQ
ODE models (Dormand-Prince RK45) beta ODE Models
Stiff ODE steppers (ode_method = Rosenbrock23 / Rodas4 / Rodas5P) beta Stiff systems
High-order ODE stepper (ode_method = Vern7) experimental Choosing a method
Automatic stiff-solver selection (ode_method = auto, the default) beta Letting ferx pick the stepper
Built-in absorption models (transit / inverse-Gaussian / Weibull) beta Absorption
Scaling beta Scaling
Data selection beta Data Selection
Derived columns beta Derived Columns
Output columns beta Output Columns
Time-to-event endpoints (TTE) beta Time-to-Event Endpoints
Stochastic differential equations (SDE) experimental SDE
Neural networks (DCM / NODE) experimental Neural Networks
Adaptive (feedback) dosing — [adaptive_dosing] block / simulate_adaptive() beta Adaptive Dosing
FOCE / FOCEI stable FOCE / FOCEI
Gauss-Newton (BHHH) — gn, gn_hybrid beta Gauss-Newton
SAEM beta SAEM
SIR beta SIR
Importance sampling (IMP) beta Importance Sampling
Outer optimizers (BOBYQA, SLSQP, L-BFGS, MMA, trust-region) beta Outer Optimizers
Time-to-event estimation (TTE) beta Time-to-Event