loglikinterval {intRvals} | R Documentation |
log-likelihood of an observed interval distribution
Description
log-likelihood of an observed interval distribution
Usage
loglikinterval(
data,
mu,
sigma,
p,
N = 5L,
fun = "gamma",
trunc = c(0, Inf),
fpp = 0
)
Arguments
data |
A numeric list of intervals. |
mu |
mean arrival interval. |
sigma |
standard deviation of the arrival interval. |
p |
chance to not observe an arrival. |
N |
Maximum number of missed observations to be taken into account (default N=5). |
fun |
Assumed distribution for the intervals, one of " |
trunc |
Use a truncated probability density function with range |
fpp |
Baseline proportion of intervals distributed as a random poisson process with mean arrival interval |
Details
Refer to intervalpdf for details on the functional form of
the probability density function of an observed interval distribution .
The log-likelihood
given a set of intervals
in
data
is given by
The function is provided to allow likelihood maximisation by other optimization tools than the default by optim.
Value
returns the value of the loglikelihood
Examples
data(goosedrop)
loglikinterval(goosedrop$interval,mu=200,sigma=50,p=.3)