size, rate, and dt.reulermultinom(n = 1, size, rate, dt)
deulermultinom(x, size, rate, dt, log = FALSE)length(rate) by n matrix.
Each column is a different random draw.
Each row contains the numbers of individuals succumbed to the corresponding process.x) containing the probabilities of observing each column of x given the specified parameters (size, rate, dt).reulermultinom(n=m,size=N,rate=r,dt=dt), where r is the vector of rates.
Evaluate the probability that $x=(x_1,\dots,x_k)$ are the numbers of individuals who have died in each of the $k$ ways over the interval $\Delta t=$dt, by doing
deulermultinom(x=x,size=N,rate=r,dt=dt).
Direct access to the underlying C routines is available: see the header file
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)Run the code above in your browser using DataLab