View source: R/distributions.R
| dctp | R Documentation |
Density, distribution, quantile and random-generation functions for the complex triparametric Pearson distribution.
dctp(x, a, b, gama, log = FALSE)
pctp(q, a, b, gama, lower.tail = TRUE, log.p = FALSE)
qctp(
p,
a,
b,
gama,
lower.tail = TRUE,
log.p = FALSE,
max_q = 1000,
max_count = 1000000L
)
rctp(n, a, b, gama)
x |
Numeric vector of counts. Nonintegers and negative values have probability zero; missing values propagate. |
a, b, gama |
Finite scalar parent parameters, with |
log |
Return log probabilities. |
q |
Numeric vector of quantiles; values are rounded down. |
lower.tail |
Return |
log.p |
Probabilities are on the log scale. |
p |
Numeric vector of probabilities. Missing values propagate. |
max_q |
Initial search endpoint, retained for compatibility. It is expanded as needed, rather than returned as a capped quantile. |
max_count |
Maximum search endpoint, at most 1,000,000. Failure to bracket a requested quantile raises an error. |
n |
Number of draws, a nonnegative integer. |
The probability at zero is evaluated from a shifted log-gamma expansion. Subsequent log probabilities use the recurrence
p(k+1)/p(k) = ((a+k)^2+b^2)/((gama+k)(k+1)).
Probabilities are not renormalised on the requested support. Moment
existence is checked by moment functions, not by density functions.
Recurrences have a work limit of 1,000,000 counts and signal an error
when that limit is insufficient. At b = 0, nonpositive integer
a gives a terminating distribution.
Numeric vector of probabilities, cumulative probabilities,
quantiles, or integer random draws. Quantiles return Inf at
probability one for an infinite-support distribution.
dctp(0:5, 1, 0.5, 6)
pctp(c(-Inf, 0, 2, Inf), 1, 0.5, 6)
qctp(c(0, 0.5, 0.99, 1), 1, 0.5, 6)
set.seed(123)
rctp(10, 1, 0.5, 6)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.