Published by the Foundation for Open Access Statistics Editors-in-chief: Bettina Grün, Torsten Hothorn, Rebecca Killick, Edzer Pebesma, Achim Zeileis    ISSN 1548-7660; CODEN JSSOBK
Authors: Peter Ruckdeschel, Matthias Kohl
Title: General Purpose Convolution Algorithm in S4 Classes by Means of FFT
Abstract: Object orientation provides a flexible framework for the implementation of the convolution of arbitrary distributions of real-valued random variables. We discuss an algorithm which is based on the fast Fourier transform. It directly applies to lattice-supported distributions. In the case of continuous distributions an additional discretization to a linear lattice is necessary and the resulting lattice-supported distributions are suitably smoothed after convolution. We compare our algorithm to other approaches aiming at a similar generality as to accuracy and speed. In situations where the exact results are known, several checks confirm a high accuracy of the proposed algorithm which is also illustrated for approximations of non-central χ2 distributions. By means of object orientation this default algorithm is overloaded by more specific algorithms where possible, in particular where explicit convolution formulae are available. Our focus is on R package distr which implements this approach, overloading operator + for convolution; based on this convolution, we define a whole arithmetics of mathematical operations acting on distribution objects, comprising operators +, -, *, /, and ^.

Page views:: 2309. Submitted: 2012-10-02. Published: 2014-08-13.
Paper: General Purpose Convolution Algorithm in S4 Classes by Means of FFT     Download PDF (Downloads: 2436)
distr_2.5.3.tar.gz: R source package Download (Downloads: 213; 2MB)
v59i04.R: R example code from the paper Download (Downloads: 317; 18KB)

DOI: 10.18637/jss.v059.i04

This work is licensed under the licenses
Paper: Creative Commons Attribution 3.0 Unported License
Code: GNU General Public License (at least one of version 2 or version 3) or a GPL-compatible license.