Generate an SAEM model using either closed-form solutions or ODE-based model definitions

gen_saem_user_fn(
  model,
  PKpars = attr(model, "default.pars"),
  pred = NULL,
  err = NULL,
  control = saemControl(),
  inPars = NULL
)

Arguments

model

a compiled SAEM model by gen_saem_user_fn()

PKpars

PKpars function

pred

pred function; This will be a focei-style pred

inPars

a character vector of parameters to be read from the input dataset (including time varying covariates)

Value

A user function based on the model to run the SAEM code

Details

Fit a generalized nonlinear mixed-effect model using the Stochastic Approximation Expectation-Maximization (SAEM) algorithm

Author

Matthew Fidler & Wenping Wang