Cayley {rotations} | R Documentation |
The symmetric Cayley distribution
Description
Density, distribution function and random generation for the Cayley distribution with concentration kappa
\kappa
.
Usage
dcayley(r, kappa = 1, nu = NULL, Haar = TRUE)
pcayley(q, kappa = 1, nu = NULL, lower.tail = TRUE)
rcayley(n, kappa = 1, nu = NULL)
Arguments
r , q |
vector of quantiles. |
kappa |
concentration parameter. |
nu |
circular variance, can be used in place of |
Haar |
logical; if TRUE density is evaluated with respect to the Haar measure. |
lower.tail |
logical; if TRUE (default) probabilities are |
n |
number of observations. If |
Details
The symmetric Cayley distribution with concentration \kappa
has density
C_C(r |\kappa)=\frac{1}{\sqrt{\pi}} \frac{\Gamma(\kappa+2)}{\Gamma(\kappa+1/2)}2^{-(\kappa+1)}(1+\cos r)^\kappa(1-\cos r).
The Cayley distribution is equivalent to the de la Vallee Poussin distribution of Schaeben1997.
Schaeben1997 leon2006
Value
dcayley |
gives the density |
pcayley |
gives the distribution function |
rcayley |
generates a vector of random deviates |
See Also
Angular-distributions for other distributions in the rotations package.
Examples
r <- seq(-pi, pi, length = 500)
#Visualize the Cayley density fucntion with respect to the Haar measure
plot(r, dcayley(r, kappa = 10), type = "l", ylab = "f(r)")
#Visualize the Cayley density fucntion with respect to the Lebesgue measure
plot(r, dcayley(r, kappa = 10, Haar = FALSE), type = "l", ylab = "f(r)")
#Plot the Cayley CDF
plot(r,pcayley(r,kappa = 10), type = "l", ylab = "F(r)")
#Generate random observations from Cayley distribution
rs <- rcayley(20, kappa = 1)
hist(rs, breaks = 10)