rlk: Create 'rlk' (Rational Law Kinetics) object

Description Usage Arguments Details Value See Also Examples

View source: R/ode.R

Description

This function creates an object of class rlk (subclass of ode), which holds the basic information of the Rational Law Kinetics system in question.

Usage

1
2
rlk(A, B, s = solver(), r = NULL, rx0 = reg("none", lower = 0, upper =
  Inf, fixed = TRUE))

Arguments

A

The matrix of powers (pxd). Here d the number of species.

B

The matrix of powers (pxd). Here d the number of species.

s

solver object.

r

An object of class reg giving info about how to regularise and bound the rate parameters. If not provided, the default one is used.

rx0

An object of class reg giving info about how to regularise and bound the initial state parameter. If not provided, the default one is used. This default reg sets fixed = TRUE, which is generally recommended.

Details

Rational Law Kinetics is a class of ODE systems, having the following vector field:

\frac{dx}{dt} = θ (x^A / (1 + x^B))

with x^A = (∏_{i=1}^dx_i^{A_{ji}})_{j=1}^p and θ an estimatable parameter matrix of dimension dxp. By convention theta will only be reported as a vector (concatinated column-wise).

Value

An object with S3 class "rlk" and "ode".

See Also

ode, numsolve, field

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
# Rational law kinetics
A <- matrix(
c(1, 0, 0, 0,
  0, 1, 2, 0,
  0, 0, 0, 1), ncol = 4, byrow = TRUE)
theta <- matrix(
c(0, 2, -0.5, 0,
  1, 0, 0, 1,
  -1, -1, -1, -1), ncol = 3, byrow = TRUE)
x0 <- c(X = 1, Y = 4, Z = 0.1, W = 0.1)
time <- seq(0, 1, by = .1)
r <- rlk(A, A[c(2, 1, 3), ])

# Solve system
numsolve(o = r, time = time, x0 = x0, param = theta)

# Evaluate field
field(r, x0, theta)

episode documentation built on Nov. 17, 2017, 5 a.m.