prob_report {reservr} | R Documentation |
Determine probability of reporting under a Poisson arrival Process
Description
Determines the probability that claims occuring under a Poisson process with
arrival intensity expo
and reporting delay distribution dist
during the
time between t_min
and t_max
are reported between tau_min
and
tau_max
.
Usage
prob_report(
dist,
intervals,
expo = NULL,
with_params = list(),
.tolerance = .Machine$double.eps^0.5,
.max_iter = 100L,
.try_compile = TRUE
)
Arguments
dist |
A reporting delay Distribution, or a compiled interval probability function. |
intervals |
A data frame with columns |
expo |
Poisson intensity. If given, must be a vectorised function that
yields the intensity of the claim arrival process at a specified time.
|
with_params |
Parameters of |
.tolerance |
Absolute element-wise tolerance. |
.max_iter |
Maximum number of iterations. The number of
integration intervals will be at most |
.try_compile |
Try compiling the distributions probability function to speed up integration? |
Details
The reporting probability is given by
P(x + d in [tmin, tmax] | x in [xmin, xmax]) = E(P(x + d in [tmin, tmax] | x) | x in [xmin, xmax]) / P(x in [xmin, xmax]) = int_[xmin, xmax] expo(x) P(x + d in [tmin, tmax]) dx = int_[xmin, xmax] expo(x) P(d in [tmin - x, tmax - x]) dx / int_[xmin, xmax] expo(x) dx
prob_report
uses integrate_gk()
to compute the two integrals.
Value
A vector of reporting probabilities, with one entry per row of intervals
.
Examples
dist <- dist_exponential()
ints <- data.frame(
xmin = 0,
xmax = 1,
tmin = seq_len(10) - 1.0,
tmax = seq_len(10)
)
params <- list(rate = rep(c(1, 0.5), each = 5))
prob_report(dist, ints, with_params = params)