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

Description Usage Arguments Value Author(s) See Also Examples

View source: R/poisson.R

Description

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

Usage

1
2
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

Instance of PoissonProcessScenario

Author(s)

Kristian Brock - Author, Daniel Slade - Contributor

See Also

hpp.scenario, PoissonProcessScenario

Examples

1
2
3
4
5
6
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')

Example output

  [1]   0.00000000   0.04591219   0.18364877   0.41320974   0.73459510
  [6]   1.14780484   1.65283897   2.24969748   2.93838039   3.71888768
 [11]   4.59121935   5.55537542   6.61135587   7.75916071   8.99878993
 [16]  10.33024354  11.75352154  13.26862393  14.87555070  16.53491530
 [21]  18.19473552  19.85449822  21.51425085  23.17398343  24.83378112
 [26]  26.49345459  28.15318599  29.81295588  31.47267501  33.13243259
 [31]  34.79211781  36.45183601  38.11163927  39.77135066  41.43110761
 [36]  43.09065995  44.75049378  46.41002445  48.06994521  49.72976068
 [41]  51.38950385  53.04925378  54.70903188  56.36875111  58.02848414
 [46]  59.68823292  61.34796702  63.00771806  64.66750312  66.32703073
 [51]  67.98691501  69.64665285  71.30638483  72.96611745  74.62589696
 [56]  76.28498258  77.94523694  79.60400922  81.26484667  82.92453283
 [61]  84.58432748  86.24351304  87.90373598  89.56347901  91.22326860
 [66]  92.88296987  94.54297705  96.20214916  97.86221378  99.52186412
 [71] 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000
 [76] 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000
 [81] 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000
 [86] 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000
 [91] 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000
 [96] 100.00000000 100.00000000 100.00000000 100.00000000 100.00000000

poisson documentation built on May 2, 2019, 6:53 a.m.