Learn R Programming

poisson (version 1.0)

nhpp.lik: Non-homogeneous Poisson process likelihood

Description

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

Usage

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

See Also

nhpp.mle, hpp.lik

Examples

Run this code
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

Run the code above in your browser using DataLab