Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

dynmodel.mcmc

Fit a non-population dynamic model using mcmc


Description

Fit a non-population dynamic model using mcmc

Usage

dynmodel.mcmc(
  system,
  model,
  evTable,
  inits,
  data,
  fixPars = NULL,
  nsim = 500,
  squared = TRUE,
  seed = NULL
)

Arguments

system

an RxODE object

model

a list of statistical measurement models

evTable

an Event Table object

inits

initial values of system parameters

data

input data

fixPars

fixed system parameters

nsim

number of mcmc iterations

squared

if parameters be squared during estimation

seed

random number seed

Value

A dyn.mcmc object detailing the model fit

Author(s)

Wenping Wang

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.mcmc(sys1, mod, ev, inits, dat, fixPars))

nlmixr

Nonlinear Mixed Effects Models in Population PK/PD

v2.0.4
GPL (>= 2)
Authors
Matthew Fidler [aut] (<https://orcid.org/0000-0001-8538-6691>), Yuan Xiong [aut], Rik Schoemaker [aut] (<https://orcid.org/0000-0002-7538-3005>), Justin Wilkins [aut] (<https://orcid.org/0000-0002-7099-9396>), Wenping Wang [aut, cre], Robert Leary [ctb], Mason McComb [aut] (<https://orcid.org/0000-0001-9871-8616>), Mirjam Trame [ctb], Teun Post [ctb], Richard Hooijmaijers [aut], Hadley Wickham [ctb], Dirk Eddelbuettel [cph], Johannes Pfeifer [ctb], Robert B. Schnabel [ctb], Elizabeth Eskow [ctb], Emmanuelle Comets [ctb], Audrey Lavenu [ctb], Marc Lavielle [ctb], David Ardia [cph], Daniel C. Dillon [ctb], Katharine Mullen [cph], Ben Goodrich [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.