difficulty in running model
Hi Ron,
I am attempting to create a simulation with a simple two-compartment oral model. Although the model compiles, the simulation does not seem to recognize the dose, and my simulation output is nothing but "0"s. Can you help please?
Thanks in advance.
Jim Woodworth
mod2 <-new_ode_model(code=" conc = A[2]/V dAdt[1] = -KAA[1] dAdt[2] = KAA[1] +(Q/V3)*A[3] - (Q/V)*A[2] - (CL/V)*A[2] dAdt[3] =(CL/V)*A[2] - (Q/V3)*A[3] ",declare_variables= c("F"), dose = list(cmt=1,bioav="F"), obs = list(cmt=2,scale="V"))
reg3 <- new_regimen(amt=3800, n=5, times=c(0,24,48,72,96), type="oral")
par2 <-list(KA=1,CL=7.65,V=20,V3=25.7,Q=60.9,F=.9)
data3 <-sim(ode=mod2, regimen=reg3, parameters=par2, n=100, omega = c(0.1,0.05,0.1), only_obs=TRUE )
sorry, for delay in response. Please note that development of PKPDsim is continued at https://github.com/InsightRX/PKPDsim, code here will not be updated. So please install PKPDsim either from CRAN or using devtools("InsightRX/PKPDsim").
Regarding the above code, please note that parameters cannot be used as vectors (i.e. KAA[1] is not allowed). If you just change that to KA the simulation worked fine for me.