Fit a non-population dynamic model

dynmodel(system, model, evTable, inits, data, fixPars = NULL,
  method = c("Nelder-Mead", "L-BFGS-B", "PORT"),
  control = list(ftol_rel = 1e-06, maxeval = 999), squared = T)

Arguments

system

an RxODE object

model

a list of statistical meaurement models

evTable

an Event Table object

inits

initial values of system parameters

data

input data

fixPars

fixed system parameters

method

estimation method: choice of Nelder-Mead, L-BFGS-B, and PORT.

control

optional minimization control parameters

squared

if parameters be squared during estimation

Examples

ode <- " dose=200; pi = 3.1415926535897931; if (t<=0) { fI = 0; } else { fI = F*dose*sqrt(MIT/(2.0*pi*CVI2*t^3))*exp(-(t-MIT)^2/(2.0*CVI2*MIT*t)); } C2 = centr/V2; C3 = peri/V3; d/dt(centr) = fI - CL*C2 - Q*C2 + Q*C3; d/dt(peri) = Q*C2 - Q*C3; " sys1 <- RxODE(model = ode) ## ------------------------------------------------------------------------ dat <- invgaussian mod <- cp ~ C2 + prop(.1) inits <- c(MIT=190, CVI2=.65, F=.92) fixPars <- c(CL=.0793, V2=.64, Q=.292, V3=9.63) ev <- eventTable() ev$add.sampling(c(0, dat$time)) (fit <- dynmodel(sys1, mod, ev, inits, dat, fixPars))
#> Warning: NaNs produced
#> est %cv #> MIT 191.92801080 NaN #> CVI2 0.65545026 NaN #> F 0.90606339 NaN #> err 0.07868075 18.99873 #> #> -loglik AIC BIC #> -5.5421498 -3.0842996 -0.5280703 #>