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.