Learn R Programming

poisson (version 1.0)

nhpp.scenario: Simulate a non-homogeneous Poisson process scenario

Description

Simulate a non-homogeneous Poisson process scenario, with sample paths, expected value process, and quantile processes.

Usage

nhpp.scenario(rate, num.events, prob.func, num.sims = 100, t0 = 0, t1 = NULL, num.points = 100, quantiles = c(0.025, 0.975), ...)

Arguments

rate
the rate at which events occur in the equivalent homogeneous Poisson process, aka lambda
num.events
Number of event times to simulate in each process
prob.func
aka intensity function, function that takes time as sole argument and returns value between 0 and 1
num.sims
Number of simulated paths to plot
t0
Start time
t1
End time
num.points
Number of points to use in estimating mean and quantile processes
quantiles
plot these quantile processes
...
further arguments to be passed to or from methods

Value

See Also

hpp.scenario, PoissonProcessScenario

Examples

Run this code
intensity <- function(t) pmin(t/3, 1)
rate <- 10
num.events <- 100
scen = nhpp.scenario(rate, num.events, num.sims = 100, prob.func=intensity)
scen@x.bar
plot(scen, main='My NHPP Scenario')

Run the code above in your browser using DataLab