Skip to contents

Get or set a named-numeric vector of forced parameters stored in a hidden slot of an rxode2 ui. Forced parameters override the values supplied in params/data and the model initial estimates on every solve of that ui (they are written into every subject/simulation column at solve setup, the same injection point used by par-loader hooks). Because the values live on the ui they travel with it – through model piping and into any nlmixr2 fit built from it – so the model stays self-contained and portable (e.g. a fit that carries trained neural-network weights re-solves, predicts and simulates with those weights with no external state).

Usage

rxForcedPars(ui)

rxForcedPars(ui) <- value

Arguments

ui

an rxode2 ui / model function.

value

named numeric vector of forced parameter values, or NULL.

Value

the getter returns the named numeric vector (or NULL); the setter returns the (modified) ui.

Details

The value is stored directly in the ui environment (not in the printed meta block, so it stays hidden) and registered as a sticky model item so it survives model piping. Names must be model parameters; names that are not model parameters are ignored at solve time. Set to NULL (or an empty vector) to clear.

Author

Matthew L. Fidler