dist.HalfCauchy: Half-Cauchy Distribution In LaplacesDemon: Complete Environment for Bayesian Inference

Description

These functions provide the density, distribution function, quantile function, and random generation for the half-Cauchy distribution.

Usage

 1 2 3 4 dhalfcauchy(x, scale=25, log=FALSE) phalfcauchy(q, scale=25) qhalfcauchy(p, scale=25) rhalfcauchy(n, scale=25)

Arguments

 x,q These are each a vector of quantiles. p This is a vector of probabilities. n This is the number of observations, which must be a positive integer that has length 1. scale This is the scale parameter alpha, which must be positive. log Logical. If log=TRUE, then the logarithm of the density is returned.

Details

• Application: Continuous Univariate

• Density: p(theta) = 2alpha / pi(theta^2 + alpha^2), theta >= 0

• Inventor: Derived from Cauchy

• Notation 1: theta ~ HC(alpha)

• Notation 2: p(theta) = HC(theta | alpha)

• Parameter 1: scale parameter alpha > 0

• Mean: E(theta) = does not exist

• Variance: var(theta) = does not exist

• Mode: mode(theta) = 0

The half-Cauchy distribution with scale alpha=25 is a recommended, default, weakly informative prior distribution for a scale parameter. Otherwise, the scale, alpha, is recommended to be set to be just a little larger than the expected standard deviation, as a weakly informative prior distribution on a standard deviation parameter.

The Cauchy distribution is known as a pathological distribution because its mean and variance are undefined, and it does not satisfy the central limit theorem.

Value

dhalfcauchy gives the density, phalfcauchy gives the distribution function, qhalfcauchy gives the quantile function, and rhalfcauchy generates random deviates.