Get started
ferx fits nonlinear mixed-effects models defined in a small, readable DSL (.ferx files), powered by a Rust engine. There are two ways to run it:
- From R — the
ferx-rpackage wraps the engine, takes adata.frame, and returns a fit object you can plot and report on. - From the command line — the
ferxCLI reads a.ferxmodel plus a CSV and writes results to disk. No R involved.
Both call the same engine and produce the same estimates.
Run from R
Install the package:
pak::pak("FeRx-NLME/ferx-r")Then fit the bundled warfarin example:
library(ferx)
ex <- ferx_example("warfarin")
fit <- ferx_fit(ex$model, ex$data)
print(fit)ferx_example() (no argument) lists all bundled examples.
For installation options (Docker, platform notes) and the full R workflow — diagnostics, simulation, covariates, IOV — see the ferx-r book.
Run from the CLI
The CLI ships with ferx-core. Point it at a .ferx model and a CSV:
ferx warfarin.ferx --data warfarin.csvIt writes the fit results (estimates, predictions) to disk next to the inputs.
For building the CLI, estimation settings, the .ferx DSL spec, and using the engine as a Rust library, see the ferx-core book.