Density, distribution function and quantile function of the CC distribution
Density, distribution function and quantile function of the CC distribution
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)
Arguments
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)?
Details
The density of the CC distribution is computed. The probability mass function of the CC distribution (Papadatos, 2022) is given by P(X=k)=πtanh(λπ)λ2+κ2λ.
The cumulative distribution function of the CC distribution is computed. We explore the property of the CC distribution that P(X=−κ)=P(X=κ), where κ>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.
Returns
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.
References
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.
Author(s)
Michail Tsagris.
R implementation and documentation: Michail Tsagris mtsagris@uoc.gr .