HalfCauchy | R Documentation |
Density, distribution function, quantile function and random generation for the half-Cauchy distribution.
dhcauchy(x, sigma = 1, log = FALSE)
phcauchy(q, sigma = 1, lower.tail = TRUE, log.p = FALSE)
qhcauchy(p, sigma = 1, lower.tail = TRUE, log.p = FALSE)
rhcauchy(n, sigma = 1)
x , q |
vector of quantiles. |
sigma |
positive valued scale parameter. |
log , log.p |
logical; if TRUE, probabilities p are given as log(p). |
lower.tail |
logical; if TRUE (default), probabilities are |
p |
vector of probabilities. |
n |
number of observations. If |
If X
follows Cauchy centered at 0 and parametrized by scale \sigma
,
then |X|
follows half-Cauchy distribution parametrized by
scale \sigma
. Half-Cauchy distribution is a special case of half-t
distribution with \nu=1
degrees of freedom.
Gelman, A. (2006). Prior distributions for variance parameters in hierarchical models (comment on article by Browne and Draper). Bayesian analysis, 1(3), 515-534.
Jacob, E. and Jayakumar, K. (2012). On Half-Cauchy Distribution and Process. International Journal of Statistika and Mathematika, 3(2), 77-81.
HalfT
x <- rhcauchy(1e5, 2)
hist(x, 2e5, freq = FALSE, xlim = c(0, 100))
curve(dhcauchy(x, 2), 0, 100, col = "red", add = TRUE)
hist(phcauchy(x, 2))
plot(ecdf(x), xlim = c(0, 100))
curve(phcauchy(x, 2), col = "red", lwd = 2, add = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.