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:

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.csv

It 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.