log_convolve_power: Logarithm of the 'L'-fold convolution of 'exp(log_pmf)', with...

Description Usage Arguments Value References See Also Examples

View source: R/sisfft.R

Description

log_convolve_power returns the logarithm of an approximation of the convolution of exp(log_pmf) with itself L times. The approximation has relative error bounded by beta, along with the subtractive factor of delta. If p is the exact convolution and v is the approximation, then it satisfies p[i] * (1 - beta) - delta <= v[i] <= p[i] * (1 + beta) for all i.

Usage

1
log_convolve_power(log_pmf, L, beta, delta)

Arguments

log_pmf

a numeric vector, the logarithm of a pmf.

L

a positive integer giving the the number of times to convolve log_pmf with itself.

beta

a number less than 0.5, to control the relative error.

delta

a non-negative number, to act as a lower bound on elements needed.

Value

A vector that is the logarithm of the approximation to the convolution.

References

Huon Wilson, Uri Keich, Accurate small tail probabilities of sums of iid lattice-valued random variables via FFT, Submitted.

See Also

log_convolve log_pvalue

Examples

1
2
3
4
 pmf <- c(0.5, 0.5)
 convolve <- log_convolve_power(log(pmf), 3, 1e-3, 0)
 exact <- c(0.125, 0.375, 0.375, 0.125)
 (exact * (1 - 1e-3) <= pmf) & (pmf <= exact * (1 + 1e-3))

huonw/sisfft documentation built on May 17, 2019, 9:13 p.m.