Haar {rotations} | R Documentation |
Uniform distribution
Description
Density, distribution function and random generation for the uniform distribution.
Usage
dhaar(r)
phaar(q, lower.tail = TRUE)
rhaar(n)
Arguments
r , q |
vector of quantiles. |
lower.tail |
logical; if TRUE (default), probabilities are |
n |
number of observations. If |
Details
The uniform distribution has density
with respect to the Lebesgue
measure. The Haar measure is the volume invariant measure for SO(3) that plays the role
of the uniform measure on SO(3) and is the angular distribution that corresponds
to the uniform distribution on SO(3), see
UARS
. The uniform distribution with respect to the Haar measure is given
by
Because the uniform distribution with respect to the Haar measure gives a horizontal line at 1 with respect to the Lebesgue measure, we called this distribution 'Haar.'
Value
dhaar |
gives the density |
phaar |
gives the distribution function |
rhaar |
generates random deviates |
See Also
Angular-distributions for other distributions in the rotations package.
Examples
r <- seq(-pi, pi, length = 1000)
#Visualize the uniform distribution with respect to Lebesgue measure
plot(r, dhaar(r), type = "l", ylab = "f(r)")
#Visualize the uniform distribution with respect to Haar measure, which is
#a horizontal line at 1
plot(r, 2*pi*dhaar(r)/(1-cos(r)), type = "l", ylab = "f(r)")
#Plot the uniform CDF
plot(r,phaar(r), type = "l", ylab = "F(r)")
#Generate random observations from uniform distribution
rs <- rhaar(50)
#Visualize on the real line
hist(rs, breaks = 10)