stable_convolve: Numerically stable convolution function for two pmf vectors

stable_convolveR Documentation

Numerically stable convolution function for two pmf vectors

Description

Unlike stats::convolve(), this function does not use the FFT algorithm, which can generate negative numbers when below machine precision.

Usage

stable_convolve(a, b)

Arguments

a

Numeric vector, the first sequence.

b

Numeric vector, the second sequence.

Value

A numeric vector representing the convolution of a and b.


EpiNow2 documentation built on June 17, 2026, 1:07 a.m.