nhpp.mean: Expected value of a non-homogeneous Poisson process.

Description Usage Arguments Value Author(s) See Also Examples

View source: R/poisson.R

Description

Calculate the expected value of a non-homogeneous Poisson process at points in time.

Usage

1
nhpp.mean(rate, prob.func, t0 = 0, t1 = 1, num.points = 100, maximum = NULL)

Arguments

rate

the rate at which events occur in the Poisson process, aka lambda

prob.func

function that takes time as sole argument and returns value between 0 and 1

t0

start time

t1

end time

num.points

number of points between t0 and t1 to use in estimating mean

maximum

the optional maximum value that the process should take

Value

A numeric vector of length num.points

Author(s)

Kristian Brock - Author, Daniel Slade - Contributor

See Also

nhpp.scenario, hpp.mean

Examples

1
2
intensity <- function(t) pmin(t/3, 1)
nhpp.mean(rate = 20, t1 = 5, maximum = 50, prob.func=intensity)

Example output

  [1]  0.000000000  0.008502534  0.034010135  0.076522804  0.136040540
  [6]  0.212563344  0.306091215  0.416624154  0.544162160  0.688705234
 [11]  0.850253376  1.028806584  1.224364861  1.436928205  1.666496616
 [16]  1.913070095  2.176648641  2.457232255  2.754820937  3.069414686
 [21]  3.401013502  3.749617386  4.115226337  4.497840356  4.897459443
 [26]  5.314083597  5.747712818  6.198347107  6.665986464  7.150630888
 [31]  7.652280380  8.170934939  8.706594565  9.259259259  9.828929021
 [36] 10.415603850 11.019283747 11.639968711 12.277658742 12.932353841
 [41] 13.604054008 14.292759242 14.998469544 15.721184913 16.460905350
 [46] 17.217630854 17.991361426 18.782097065 19.589837772 20.414583546
 [51] 21.256334388 22.115090297 22.990851274 23.883617318 24.793388430
 [56] 25.720164609 26.663945856 27.624732170 28.602523552 29.597320001
 [61] 30.606048727 31.616176405 32.625133817 33.636344341 34.646460910
 [66] 35.656555066 36.666661346 37.676726797 38.686884793 39.696955689
 [71] 40.707079406 41.717098908 42.727259841 43.737368301 44.747457047
 [76] 45.757571375 46.767677396 47.777758348 48.787629393 49.779595001
 [81] 50.000000000 50.000000000 50.000000000 50.000000000 50.000000000
 [86] 50.000000000 50.000000000 50.000000000 50.000000000 50.000000000
 [91] 50.000000000 50.000000000 50.000000000 50.000000000 50.000000000
 [96] 50.000000000 50.000000000 50.000000000 50.000000000 50.000000000

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