if (FALSE) {
f_ode_pop <- function(){
ini({
lV <- 1
prop.err <- 0.1
})
model({
V <- lV
d/dt(centr) = NN1(state=centr,min_init=0,max_init=300)
cp = centr / V
cp ~ prop(prop.err)
})
}
f_new_pop <- nn_converter_nlmixr(f_ode_pop,pop_only = TRUE)
fit_pop <- nlmixr2(f_new_pop,data,est="bobyqa")
f_ode <- function(){
ini({
lV <- 1
eta.V ~ 0.1
prop.err <- 0.1
})
model({
V <- lV * exp(eta.V)
d/dt(centr) = NN1(state=centr,min_init=0,max_init=300)
cp = centr / V
cp ~ prop(prop.err)
})
}
f_new <- nn_converter_nlmixr(f_ode,pop_only = FALSE, pre_fixef = fit_pop$fixef)
}
Run the code above in your browser using DataLab