Learn R Programming

ppsbm (version 1.0.0)

generatePP: Poisson process generator

Description

Generates one realization of an inhomogeneous Poisson process (PP) with given intensity function (using the thinning method).

Usage

generatePP(intens, Time, max.intens)

Value

Vector with the values of one realization of the PP.

Arguments

intens

Intensity function defined on [0,Time] (needs to be positive).

Time

Positive real number. [0,Time] is the total time interval of observation.

max.intens

Positive real number. Upper bound of intensity on [0,Time].

Examples

Run this code
# Generate a Poisson Process on time interval [0,30] with intensity function
# intens= function(x) 100*x*exp(-8*x)
# using max.intens = 5

intens <- function(x) 100*x*exp(-8*x)

generatePP(intens, Time=30, max.intens=5)

Run the code above in your browser using DataLab