File: ConvPow.Rd

package info (click to toggle)
r-cran-distr 2.9.7%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,344 kB
  • sloc: ansic: 199; sh: 13; makefile: 2
file content (106 lines) | stat: -rw-r--r-- 4,356 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
\name{convpow-methods}
\docType{methods}
\alias{convpow}
\alias{convpow-methods}
\alias{convpow,AcDcLcDistribution-method}
\alias{convpow,AbscontDistribution-method}
\alias{convpow,LatticeDistribution-method}
\alias{convpow,DiscreteDistribution-method}
\alias{convpow,AcDcLcDistribution-method}
\alias{convpow,Norm-method}
\alias{convpow,Binom-method}
\alias{convpow,Nbinom-method}
\alias{convpow,ExpOrGammaOrChisq-method}
\alias{convpow,Cauchy-method}
\alias{convpow,Pois-method}
\alias{convpow,Dirac-method}

\title{Distribution of the sum of univariate i.i.d r.v's}
\description{
  Method \code{convpow} determines the distribution of the sum of N univariate
  i.i.d r.v's by means of DFT}


\usage{
  convpow(D1,...)
  \S4method{convpow}{AbscontDistribution}(D1,N)
  \S4method{convpow}{LatticeDistribution}(D1,N, 
                     ep = getdistrOption("TruncQuantile"))
  \S4method{convpow}{DiscreteDistribution}(D1,N)
  \S4method{convpow}{AcDcLcDistribution}(D1,N, 
                     ep = getdistrOption("TruncQuantile"))
}

\arguments{
  \item{D1}{an object of (a sub)class (of) \code{"AbscontDistribution"} or  
            \code{"LatticeDistribution"} or of \code{"UnivarLebDecDistribution"}}
  \item{\dots}{not yet used; meanwhile takes up N }
  \item{N}{ an integer or 0 (for 0 returns Dirac(0), for 1 D1)}
  \item{ep}{ numeric of length 1 in (0,1) ---
             for \code{"LatticeDistribution"}: support points will be 
             cancelled if their probability is less than \code{ep};
             for \code{"UnivarLebDecDistribution"}: if \code{(acWeight(object)<ep)} 
             we work with the discrete parts only, and, similarly, if
             \code{(discreteWeight(object)<ep)} we with the absolutely continuous 
             parts only.}
  }
\details{
  in the methods implemented a second argument \code{N} is obligatory;
  the general methods use a general purpose convolution algorithm for 
  distributions by means of D/FFT. In case of an argument of class 
  \code{"UnivarLebDecDistribution"}, the result will in generally be
   again of class \code{"UnivarLebDecDistribution"}. However, if \code{acWeight(D1)}
   is positive, \code{discreteWeight(convpow(D1,N))} will decay exponentially
   in \code{N}, hence from some (small) \eqn{N_0} on, the result will be of
   class \code{"AbscontDistribution"}. This is used algorithmically, too, as 
   then only the a.c. part needs to be convolved.
   In case of an argument \code{D1} of class \code{"DiscreteDistribution"},
   for \code{N} equal to 0,1 we return the obvious solutions, and for \code{N==2} 
   the return value is \code{D1+D1}. For \code{N>2}, we split up \code{N} into
   \code{N=N1+N2}, \code{N1=floor(N/2)} and recursively return
   \code{convpow(D1,N1)+convpow(D1,N2)}.
   }

\value{Object of class \code{"AbscontDistribution"}, \code{"DiscreteDistribution"},
       \code{"LatticeDistribution"} resp. \code{"AcDcLcDistribution"}}

\section{further S4-Methods}{
  There are particular methods for the following classes, using explicit 
  convolution formulae:
  \describe{
    \item{\code{signature(D1="Norm")}}{returns class \code{"Norm"}}
    \item{\code{signature(D1="Nbinom")}}{returns class \code{"Nbinom"}}
    \item{\code{signature(D1="Binom")}}{returns class \code{"Binom"}}
    \item{\code{signature(D1="Cauchy")}}{returns class \code{"Cauchy"}}
    \item{\code{signature(D1="ExpOrGammaOrChisq")}}{returns class 
         \code{"Gammad"} ---if \code{D1} may be coerced to \code{Gammad}}
    \item{\code{signature(D1="Pois")}}{returns class \code{"Pois"}}
    \item{\code{signature(D1="Dirac")}}{returns class \code{"Dirac"}}
  }
}

\author{Peter Ruckdeschel \email{peter.ruckdeschel@uni-oldenburg.de}\cr
Matthias Kohl \email{matthias.kohl@stamats.de}
Thomas Stabla \email{statho3@web.de}
}
%\note{}
\seealso{\code{\link{operators}}, \code{distrARITH()}}

\examples{
convpow(Exp()+Pois(),4)
}

\references{
Kohl, M., Ruckdeschel, P., (2014):
   General purpose convolution algorithm for distributions 
  in S4-Classes by means of FFT. \emph{J. Statist. Softw.}
  \bold{59}(4): 1-25.
}

\concept{convolution for distributions}
\concept{arithmetics for distributions}
\concept{info file}
\concept{FFT}
\concept{DFT}
\keyword{distribution}