LDEsysMat | R Documentation |
Generate the system matrix for the linear differential equations determined by a compartment model.
LDEsysMat(pars, incidence)
pars |
a numeric vector of parameter values. |
incidence |
an integer matrix with columns named |
A compartment model describes material transfer between k
in a system of k
compartments to a linear system of differential
equations. Given a description of the system and a vector of parameter
values this function returns the system matrix.
This function is intended for use in a general system for solving compartment models, as described in Bates and Watts (1988).
A k
by k
numeric matrix.
Douglas Bates bates@stat.wisc.edu
Bates, D. M. and Watts, D. G. (1988), Nonlinear Regression Analysis and Its Applications, Wiley, New York.
# incidence matrix for a two compartment open system
incidence <-
matrix(c(1,1,2,2,2,1,3,2,0), ncol = 3, byrow = TRUE,
dimnames = list(NULL, c("Par", "From", "To")))
incidence
LDEsysMat(c(1.2, 0.3, 0.4), incidence)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.