
Last chance! 50% off unlimited learning
Sale ends in
The solve_fun
can solve time-dependent quantities/concentrations of different variables in PK model
through the imported deSolve function. It can be used to solve the function with analytical solution.
solve_fun(x, time = NULL, params, initParmsfun = NULL, initState,
dllname, func, initfunc, outnames, method = "lsode", rtol = 1e-08,
atol = 1e-12, model = NULL, lnparam = F, vars, ...)
a list of storing information in the defined sensitivity function.
a vector to define the given time sequence.
parameters passed to func
.
a character for the given specific initial parameter function.
a vector that define the initial values of state variables for the ODE system.
a string giving the name of the shared library (without extension) that contains the compiled function.
the name of the function in the dynamically loaded shared library.
the name of the initialization function (which initialises values of parameters), as provided in dllname.
the names of output variables calculated in the compiled function func
.
method used by integrator (desolve).
argument passed to integrator (desolve).
argument passed to integrator (desolve).
the defined analytical equation with functional output.
a logical value that make the statement of the log-transformed parameter (default FALSE).
a character for the selected output.
additional arguments for deSolve::ode method.
K. Soetaert, T. Petzoldt, R.W. Setzer, 2010, Solving differential equations in R: package deSolve, J. Stat. Soft., 33:9
# NOT RUN {
q <- "qunif"
q.arg <- list(list(min = 0.6, max = 1.0),
list(min = 0.5, max = 1.5),
list(min = 0.02, max = 0.3),
list(min = 20, max = 60))
params <- c("F","KA","KE","V")
set.seed(1234)
x <- rfast99(params = params, n = 200, q = q, q.arg = q.arg, rep = 20)
time <- seq(from = 0.25, to = 12.25, by = 0.5)
y <- solve_fun(x, model = FFPK, time = time, vars = "output")
pksim(y) # Visualize uncertainty of model output
# }
Run the code above in your browser using DataLab