| Sibuya | R Documentation |
The Sibuya distribution \mathrm{Sib}(\alpha) can be
defined by its Laplace transform
1-(1-\exp(-t))^\alpha,\ t\in[0,\infty),
its distribution function
F(k)=1-(-1)^k{\alpha-1\choose k}=1-\frac{1}{kB(k,1-\alpha)},\
k\in\mathbf{N}
(where B denotes the beta function) or its probability
mass function
p_k={\alpha\choose k}(-1)^{k-1},\ k\in\mathbf{N},
where \alpha\in(0,1].
pSibuya evaluates the distribution function.
dSibuya evaluates the probability mass function.
rSibuya generates random variates from
\mathrm{Sib}(\alpha) with
the algorithm described in Hofert (2011), Proposition 3.2.
dsumSibuya gives the probability mass function of the
n-fold convolution of Sibuya variables, that is, the sum of n
independent Sibuya random variables,
S = \sum_{i=1}^n X_i, where
X_i \sim \mathrm{Sib}(\alpha).
This probability mass function can be shown (see Hofert (2010, pp. 99)) to be
\sum_{j=1}^n{n\choose j}{j\alpha\choose k} (-1)^{k-j},\
k\in\{n,n+1,\dots\}.
rSibuya(n, alpha)
dSibuya(x, alpha, log=FALSE)
pSibuya(x, alpha, lower.tail=TRUE, log.p=FALSE)
dsumSibuya(x, n, alpha,
method=c("log", "direct", "diff", "exp.log",
"Rmpfr", "Rmpfr0", "RmpfrM", "Rmpfr0M"),
mpfr.ctrl = list(minPrec = 21, fac = 1.25, verbose=TRUE),
log=FALSE)
n |
for |
alpha |
parameter in |
x |
vector of |
log, log.p |
|
lower.tail |
|
method |
character string specifying which computational method is to be applied. Implemented are:
|
mpfr.ctrl |
for |
The Sibuya distribution has no finite moments, that is, specifically infinite mean and variance.
For documentation and didactical purposes, rSibuyaR is a pure-R
implementation of rSibuya, of course slower than rSibuya
as the latter is implemented in C.
Note that the sum to evaluate for dsumSibuya is numerically
highly challenging, even already for small
\alpha values (for example, n \ge 10),
and therefore should be used with care. It may require high-precision
arithmetic which can be accessed with method="Rmpfr" (and the
Rmpfr package).
A vector of positive integers of
length n containing the generated random variates.
a vector of
probabilities of the same length as x.
a vector of probabilities, positive if and only if
x >= n and of the same length as x (or n if
that is longer).
Hofert, M. (2010). Sampling Nested Archimedean Copulas with Applications to CDO Pricing. Südwestdeutscher Verlag fuer Hochschulschriften AG & Co. KG.
Hofert, M. (2011). Efficiently sampling nested Archimedean copulas. Computational Statistics & Data Analysis 55, 57–70.
rFJoe and rF01Joe (where rSibuya is
applied).
## Sample n random variates from a Sibuya(alpha) distribution and plot a
## histogram
n <- 1000
alpha <- .4
X <- rSibuya(n, alpha)
hist(log(X), prob=TRUE); lines(density(log(X)), col=2, lwd=2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.