diff options
Diffstat (limited to 'man')
| -rw-r--r-- | man/GHquad.Rd | 3 | ||||
| -rw-r--r-- | man/convolve.Rd | 20 | ||||
| -rw-r--r-- | man/lossdist.joint.Rd | 5 | ||||
| -rw-r--r-- | man/lossdistrib.Rd | 6 | ||||
| -rw-r--r-- | man/lossdistrib.fft.Rd | 11 | ||||
| -rw-r--r-- | man/lossdistrib2.Rd | 4 | ||||
| -rw-r--r-- | man/lossdistrib2.truncated.Rd | 3 | ||||
| -rw-r--r-- | man/recovdist.Rd | 3 |
8 files changed, 35 insertions, 20 deletions
diff --git a/man/GHquad.Rd b/man/GHquad.Rd index 1d62281..3a9dfab 100644 --- a/man/GHquad.Rd +++ b/man/GHquad.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/distrib.R \name{GHquad} \alias{GHquad} @@ -22,4 +22,3 @@ Gaussian distribution. if f is a function, then \eqn{\sum_{i=1}^n f(Z_i)w_i \approx \frac{1}{\sqrt{2\pi}} \int_{-\infty}^\infty f(x)e^{-\frac{x^2}{2}}\,dx}. } - diff --git a/man/convolve.Rd b/man/convolve.Rd new file mode 100644 index 0000000..b2cbbc4 --- /dev/null +++ b/man/convolve.Rd @@ -0,0 +1,20 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/distrib.R +\name{convolve} +\alias{convolve} +\title{Convolution of two discrete probability distributions} +\usage{ +convolve(dist1, dist2) +} +\arguments{ +\item{dist1}{Numeric vector of probabilities} + +\item{dist2}{Numeric vector of probabilities} +} +\value{ +Convolution of the two vectors +} +\description{ +This is the probability of the sum of the two random variables +assuming they are independent. +} diff --git a/man/lossdist.joint.Rd b/man/lossdist.joint.Rd index 1cf7a71..d803252 100644 --- a/man/lossdist.joint.Rd +++ b/man/lossdist.joint.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/distrib.R \name{lossdist.joint} \alias{lossdist.joint} @@ -16,7 +16,7 @@ lossdist.joint(p, w, S, N, defaultflag = FALSE) \item{N}{Integer, number of ticks in the grid} -\item{defaultflab}{Logical, whether to return the loss or default distribution} +\item{defaultflag}{Logical, whether to return the loss or default distribution} } \value{ q Matrix of joint loss, recovery probability distribution @@ -27,4 +27,3 @@ rowSums(q) is the loss distribution marginal For high severities, M can become bigger than N, and there is some probability mass escaping. } - diff --git a/man/lossdistrib.Rd b/man/lossdistrib.Rd index 7af12d4..bc68ce4 100644 --- a/man/lossdistrib.Rd +++ b/man/lossdistrib.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/distrib.R \name{lossdistrib} \alias{lossdistrib} @@ -14,11 +14,11 @@ A vector q such that \eqn{q_k=\Pr(S=k)} } \description{ \code{lossdistrib} computes the probability distribution of a sum -of independent Bernouilli variables with unequal probabilities. +of independent Bernouilli variables with unequal probabilities +(also called the Poisson-Binomial distribution). } \details{ We compute the probability distribution of \eqn{S = \sum_{i=1}^n X_i} where \eqn{X_i} is Bernouilli(\eqn{p_i}). This uses the simple recursive algorithm of Andersen, Sidenius and Basu } - diff --git a/man/lossdistrib.fft.Rd b/man/lossdistrib.fft.Rd index c4eae10..3843bdc 100644 --- a/man/lossdistrib.fft.Rd +++ b/man/lossdistrib.fft.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/distrib.R \name{lossdistrib.fft} \alias{lossdistrib.fft} @@ -14,13 +14,12 @@ A vector such that \eqn{q_k=\Pr(S=k)} } \description{ \code{lossdistrib.fft} computes the probability distribution of a sum -of independent Bernouilli variables with unequal probabilities. +of independent Bernouilli variables with unequal probabilities +(also called the Poisson-Binomial distribution). } \details{ We compute the probability distribution of \eqn{S = \sum_{i=1}^n X_i} where \eqn{X_i} is Bernouilli(\eqn{p_i}). -This uses the FFT, thus omplexity is of order \eqn{O(n m) + O(m\log(m))} -where \eqn{m} is the size of the grid and \eqn{n}, the number of probabilities. -It is slower than the recursive algorithm in practice. +This uses the FFT, thus complexity is of order \eqn{O(n \log(n))}, +compared to \eqn{O(n^2)} for the recursive algorithm. } - diff --git a/man/lossdistrib2.Rd b/man/lossdistrib2.Rd index 4d1dd9c..915deab 100644 --- a/man/lossdistrib2.Rd +++ b/man/lossdistrib2.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/distrib.R \name{lossdistrib2} \alias{lossdistrib2} @@ -31,5 +31,5 @@ We compute the probability distribution of \eqn{L = \sum_{i=1}^n w_i S_i X_i} where \eqn{X_i} is Bernouilli(\eqn{p_i}). If \code{defaultflag} is TRUE, we compute the distribution of \eqn{D = \sum_{i=1}^n w_i X_i} instead. This a recursive algorithm with first order correction for discretization. +Complexity is of ordier \eqn{O(nN)}, so linear for a given grid size. } - diff --git a/man/lossdistrib2.truncated.Rd b/man/lossdistrib2.truncated.Rd index 9c4854e..7e41c48 100644 --- a/man/lossdistrib2.truncated.Rd +++ b/man/lossdistrib2.truncated.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/distrib.R \name{lossdistrib2.truncated} \alias{lossdistrib2.truncated} @@ -30,4 +30,3 @@ This is actually slower than \code{lossdistrib2}, but in C this is twice as fast. For high severities, M can become bigger than the cutoff, and there is some probability mass escaping. } - diff --git a/man/recovdist.Rd b/man/recovdist.Rd index c6da216..16faba2 100644 --- a/man/recovdist.Rd +++ b/man/recovdist.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/distrib.R \name{recovdist} \alias{recovdist} @@ -34,4 +34,3 @@ as the pair of values \eqn{\left\lceil\frac{v}{lu}\right\rceil} so that \eqn{X_i} has four non zero values. } - |
