Description Usage Arguments Details Value Author(s) References Examples
Solves a mass-action ODE for a target variable Y by using smooth approximations of the predictor variables X.
1 2 3 | ode.solver(time_vec, initial_value, times, X, model, target, coefs,
smooth.type = "smoothing.spline", reltol = 10^(-10),
abstol = 10^(-16))
|
time_vec |
numeric vector. Specifices the points at which to evaluate the target trajectory. |
initial_value |
numeric value. Specifies the value of the target at initial time point. |
times |
numeric vector of length L. Specifices the time points at which the predictors where observed. |
X |
predictor matrix of dimension L x d. Each column
corresponds to a different predictor observed at the time points
|
model |
list of mass-action terms. Each element in the list consists of a vector of predictor variables which are multiplied to a single term in the mass-action equation. |
target |
integer specifing which variable is the target. |
coefs |
numeric vector. Specifies the parameter values for
each term in |
smooth.type |
string. Specifies which type of smoothing to use. The following options exist: "smoothing.spline", "loess", "linear", "constant". |
reltol |
numeric. Relative tolarance used in CVODE. |
abstol |
numeric. Absolute tolarance used in CVODE. |
For further details see the references.
object returned by CVODE.
Niklas Pfister, Stefan Bauer and Jonas Peters
Pfister, N., S. Bauer, J. Peters (2018). Identifying Causal Structure in Large-Scale Kinetic Systems ArXiv e-prints (arXiv:1810.11776).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## Generate data from Maillard reaction
simulation.obj <- generate.data.maillard(target=11,
env=rep(1:5, each=5),
L=20,
par.noise=list(noise.sd=0.1,
only.target.noise=FALSE,
relativ=TRUE))
D <- simulation.obj$simulated.data
time <- simulation.obj$time
## Solve for Melanoidin
X <- do.call(cbind, split(as.vector(t(D[1:5,])), rep(1:11, each=length(unique(time)))))
times <- rep(unique(time), 5)
odefit <- ode.solver(time, 0, times, X, list(c(8)), 11, 0.12514)
plot(odefit[,1], odefit[,2], type="l")
points(times, X[,11])
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.