## Also note that these initial estimates should be provided on the log-scale
tcl <- log(109)
tv1 <- log(512)
tq <- log(12)
tv2 <- log(156)
talpha <- log(0.171)
tbeta <- log(1.08)
## Note this covariate effects take expressions
crcl_cl<-0.32
crcl_v1<-0.29
race2_cl<-0.32
form_alpha<-1.47
stat_alpha<-1.98
## Initial estimates should be high for SAEM ETAs
eta.cl ~ .1
eta.v1 ~ .1
eta.v2 ~ .1
eta.alpha ~ .1
eta.beta ~ .01
## Also true for additive error (also ignored in SAEM)
add.err <- 0.3
I tried parallel computing with this pk model below. Not sure what is missing, it is running, but not using more than one core.
options("RxODE.cache.directory"="~/.rxCache") library(nlmixr) library(doParallel)
define the model
nimo <- function() { ini({
Note that the UI can take expressions
}) model({ CL <- exp(tcl +crcl_cllog(crcl/110)+log(1+race2race2_cl)+ eta.cl) V1 <- exp(tv1 +crcl_v1log(crcl/110)+ eta.v1) V2 <- exp(tv2 + eta.v2) Q <- exp(tq) alpha <- exp(talpha+log(1+formform_alpha)+log(1+stat*stat_alpha) + eta.alpha) beta <- exp(tbeta + eta.beta)+1
tad <- tad()
}) }
read the data
dat <- read.csv("E:/KKD/Naloxegol ped/poppk3/combined_nm.csv") head(dat) cl <- makeCluster(detectCores()-1) registerDoParallel(cl) fit <- nlmixr(nimo, dat, est="focei")