nhpp.lik: Non-homogeneous Poisson process likelihood

Description Usage Arguments Value Author(s) See Also Examples

View source: R/poisson.R

Description

Get the likelihood of a rate parameter at a specific time for observed NHPP event times and given intensity function.

Usage

1
nhpp.lik(x, T1, rate, prob.func)

Arguments

x

a vector of HPP event times

T1

Calculate likelihood at this time

rate

the putative HPP event rate

prob.func

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

Value

Returns a numerical value for the likelihood.

Author(s)

Kristian Brock - Author, Daniel Slade - Contributor

See Also

nhpp.mle, hpp.lik

Examples

1
2
3
4
5
6
intensity <- function(t) pmin(t/3, 1)
X = c(0.74, 1.50, 1.67, 2.01, 2.27)
nhpp.lik(X, T1 = 2.3, rate = 5, prob.func = intensity)
nhpp.lik(X, T1 = 2.3, rate = 6, prob.func = intensity)
nhpp.lik(X, T1 = 2.3, rate = 7, prob.func = intensity)
# 6 is the most likely of these three rates

Example output

[1] 0.280893
[1] 0.3108341
[1] 0.1999208

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