# \donttest{
# Fit a model (using nlmixr2)
pheno <- function() {
ini({
tcl <- log(0.008)
tv <- log(0.6)
eta.cl + eta.v ~ c(1,
0.01, 1)
add.err <- 0.1
})
model({
cl <- exp(tcl + eta.cl)
v <- exp(tv + eta.v)
ke <- cl / v
d/dt(A1) = - ke * A1
cp = A1 / v
cp ~ add(add.err)
})
}
fit <- nlmixr2est::nlmixr2(pheno, pheno_sd, "saem", control = list(print = 0),
table = list(cwres = TRUE, npde = TRUE))
Store. <- get.mod.lst(fit.s = fit, 1)
fitness(fit = Store.,dat = pheno_sd)
# }
Run the code above in your browser using DataLab