simPois0 | R Documentation |
Simulate an (inhomogeneous) Poisson process with a given intensity/rate function over the interval [0,T]
simPois0(int, cens = 1, int.M = optimize(int, c(0, cens), maximum = TRUE)$obj * 1.1)
int |
A (vectorized) positive function. The intensity/rate function. |
cens |
A positive scalar. The censoring time, or time of termination of observations, T. |
int.M |
A positive scalar. Maximum value of the intensity function over [0,T], or a value larger than this. |
The function works by first generating a Poisson process with constant
rate int.M
oever [0,T], and then thinning the process
with retention probability function
p(x)=\code{int}(x)/\code{int.M}
.
A numerical vector giving the event/jump times of the Poisson process in [0,T], in ascending order.
Feng Chen <feng.chen@unsw.edu.au>
simPois0
aPP <- simPois(int=function(x)200*(2+cos(2*pi*x)),cens=1,int.M=600)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.