Skip to contents

poissonians(dN = lambda) declares a poissonian dN, the increment of a Poisson counting process with rate lambda, and assigns it in the calling environment, as @poissonians dN(λ). Written linearly in differential equations, D(x) ~ f + h * dN, it becomes a jump x ~ Pre(x) + Pre(h) at rate lambda during mtkcompile(): a constant rate jump when lambda depends only on parameters, a variable rate jump otherwise.

Usage

poissonians(..., .env = parent.frame())

Arguments

...

Named rates (numbers or expressions), or strings "dN(lambda)" evaluated in the calling environment. Given a system, poissonians(sys) returns its poissonian variables instead.

.env

Environment to assign into.

Value

Invisibly, a named list of the declared poissonians.

Examples

t <- t_nounits; D <- D_nounits
variables("X(t)"); parameters("lam = 2")
poissonians(dN = lam)
sys <- mtkcompile(System(list(D(X) ~ dN), t, name = "counter"))
length(jumps(sys))
#> [1] 1