dcc function

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 μ\mu.
  • lambda: The value of the scale parameter λ\lambda.
  • 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.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=κ)=P(X=κ)P(X=-\kappa)=P(X=\kappa), where κ>0\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.

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 .

See Also

dcc, cc.mle

Examples

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])
  • Maintainer: Michail Tsagris
  • License: GPL (>= 2)
  • Last published: 2024-12-07

Useful links