dcc | R Documentation |
Density, distribution function and quantile function of the CC distribution.
dcc(y, mu = 0, lambda, logged = FALSE)
pcc(y, mu = 0, lambda)
qcc(p, mu, lambda)
y |
A vector with integer values. |
p |
A vector with probabilities. |
mu |
The value of the location parameter |
lambda |
The value of the scale parameter |
logged |
Should the logarithm of the density be returned (TRUE) or not (FALSE)? |
The density of the CC distribution is computed. The probability mass function of the CC distribution (Papadatos, 2022) is given by
P(X=k)=\dfrac{\tanh{(\lambda \pi)}}{\pi}\dfrac{\lambda}{\lambda^2+\kappa^2}.
The cumulative distribution function of the CC distribution is computed. We explore the property of the CC distribution that P(X=-\kappa)=P(X=\kappa)
, where \kappa>0
, to compute the cumulative distribution.
As for the quantile function we use the optimize
function to find the integer whose cumulative probability matches the given probability. So, basically, the qcc() works with left tailed probabilities.
dcc returns a vector with the (logged) density values, the (logged) probabilities for each value of y., pcc returns a vector with the cumulative probabilities, while qcc returns a vector with integer numbers.
Michail Tsagris.
R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.
Papadatos N. (2022). The characteristic function of the discrete Cauchy distribution In Memory of T. Cacoullos. Journal of Statistical Theory and Practice, 16(3): 47.
dcc, cc.mle
x <- round( rcauchy(100, 3, 10) )
mod <- cc.mle(x)
y <- dcc(x, mod$param[1], mod$param[3])
pcc(x[1:5], mod$param[1], mod$param[3])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.