The goal of nlmixrExtra is to extend the functionality of nlmixr.
You can install the released version of nlmixrExtra from CRAN with:
install.packages("nlmixrExtra")
You can install the development version of nlmixrExtra from GitHub with:
install.packages("remotes")
remotes::install_github("nlmixrdevelopment/nlmixrExtra")
To replace part of a model with a standard model template, you can use code like that below.
library(nlmixrExtra)
model <- function() {
ini({
lcl <- (0.01)
lv <- log(0.5)
eta_cl ~ 0.1
add_err <- 0.1
})
model({
linear_model_ode_onecmt_iv(cl=exp(lcl+eta_cl), v=exp(lv))
cp <- central/exp(lv)
cp ~ add(add_err)
})
}
nlmixr_trans(model, linear_model_ode_onecmt_iv)
The current, main goal of nlmixrExtra
is to simplify model building by
providing model templates. If you can think of a model method that could use a
template, please suggest it on the issues
page. Or, if you're
feeling adventuresome, also prepare a pull request.