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 \phi_{obs}
.
The log-likelihood L
given a set of intervals x_j
in data
is given by
L(\mu,\sigma,p)=\log \sum_j \phi_{obs}(x_j | \mu,\sigma,p)
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)