Euler-multinomial models {pomp}R Documentation

Euler-multinomial models

Description

Density and random generation for the Euler-multinomial death process with parameters size, rate, and dt.

Usage

reulermultinom(n = 1, size, rate, dt)
deulermultinom(x, size, rate, dt, log = FALSE)

Arguments

n Number of random variates to generate.
size Number of individuals at risk.
rate Hazard rates.
dt Duration of Euler step.
x Matrix or vector containing number of individuals that have succumbed to each death process.
log logical; if TRUE, return logarithm of probabilities.

Details

Direct access to the underlying C routines is available: see the header file "pomp.h", included with the package, e.g., edit(file=system.file("include/pomp.h",package="pomp")).

Value

reulermultinom Returns a length(rate) by n matrix. Each column is a different random draw. Each row contains the numbers of individuals succumbed to the corresponding process.
deulermultinom Returns a vector (of length equal to the number of columns of x) containing the probabilities of observing x given the specified parameters (size, rate, dt).

Author(s)

Aaron A. King (kingaa at umich dot edu)

See Also

euler, pomp

Examples

print(x <- reulermultinom(5,size=100,rate=c(a=1,b=2,c=3),dt=0.1))
deulermultinom(x,size=100,rate=c(1,2,3),dt=0.1)

[Package pomp version 0.22-6 Index]