Description Usage Arguments Details Value Author(s) Examples
Probability function, distribution function, quantile function and random generation for the Gamma Count distribution.
1 2 3 4 5 6 7 |
x |
Positive interger value. |
lambda |
A numeric vector with values for the location parameter of the Gamma Count distribution. |
alpha |
A numeric vector with values for the dispersion parameter of the Gamma Count distribution. |
log |
A logical value. If |
offset |
A numeric vector with the correponding space size where the counts are observed. |
lower.tail |
A logical value. If |
p |
A vector of probabilities. |
n |
An integer vector of length one that is the amount of random numbers to be generated. |
The function dgcnt()
is implemented in R. The
probability function of the Gamma Count is based on the
difference of cumulated probabilities of the Gamma density
function. These differences are numerically non distinguishable
of zero at the tails, so the logarithm of the probabilities is
-Inf
. We decide replace -Inf
by -744
, that
is the logarithm of the smallest value.
BBBB
The qgcnt()
is implemented in C++ in two
versions. The first is implemented for the idd case that
is when both lambda
and alpha
are vectors of length
one. In this case, the vector of probabilities p
is
ordered for the quantile search in the ascending direction. At
the end, the values are restored to the original order. The other
version deals with the non idd case by recursive calls of
the function at each vector point. For simulation studies is
desirable use the idd version because it is faster.
The rgcnt()
is implemented in C++ in two
versions. The first is implemented for the idd case that
is when both lambda
and alpha
are vectors of length
one. In this case, a vector of n
uniform random numbers is
ordered for the quantile search in the ascending direction. At
the end, the values are randomized in the vector. The other
version deals with the non idd case by recursive calls of
the function at each vector point. For simulation studies is
desirable use the idd version because it is faster.
dgcnt
gives the probability \Pr(X = x),
pgcnt
gives the cummulated probability \Pr(X ≤q x)
or its complement, qgcnt
gives the quantiles and
rgcnt
generates random values.
Walmes Zeviani, walmes@ufpr.br.
1 2 3 4 5 6 7 8 9 10 11 12 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.