Rev Language Reference


dnHalfCauchy - half-Cauchy Distribution

Half-Cauchy distribution with location equal to ‘location’ and scale equal to ‘scale’.

Aliases

  • dnCauchyPlus

Usage

dnHalfCauchy(Real location, RealPos scale)

Arguments

location : Real (pass by const reference)
The location parameter.
scale : RealPos (pass by const reference)
The scale parameter.

Domain Type

Details

The half-Cauchy distribution has density: f(x) = 2/(pi * sigma) * 1/(1 + x-(location/scale)^2)

Example

# we simulate some obversations
x <- rHalfCauchy(n=10,location=0,scale=1)
# let's see what the minimum is (you could do the max too). If this is not ‘location’, we're in trouble!
min(x)
# let's also see what the mean and the variance are.
The mean will not converge with more samples, the Cauchy family has no moments.
mean(x)
var(x)
sd(x)