Closed mattfidler closed 1 month ago
Crashing reprex
library(nlmixr2est)
one.compartment <- function() {
ini({
tka <- fix(0.45) # Log Ka
tcl <- 1 # Log Cl
tv <- fix(3.45) # Log V
eta.ka ~ fix(0.6)
eta.cl ~ fix(0.3)
eta.v ~ fix(0.1)
add.sd <- fix(0.7)
})
model({
ka <- exp(tka + eta.ka)
cl <- exp(tcl + eta.cl)
v <- exp(tv + eta.v)
d/dt(depot) = -ka * depot
d/dt(center) = ka * depot - cl / v * center
cp = center / v
cp ~ add(add.sd)
})
}
fit2 <- nlmixr(one.compartment, theo_sd, est="focei", control=list(print=0))