Fisher: The matrix-Fisher distribution

FisherR Documentation

The matrix-Fisher distribution

Description

Density, distribution function and random generation for the matrix-Fisher distribution with concentration kappa κ.

Usage

dfisher(r, kappa = 1, nu = NULL, Haar = TRUE)

pfisher(q, kappa = 1, nu = NULL, lower.tail = TRUE)

rfisher(n, kappa = 1, nu = NULL)

Arguments

r, q

vector of quantiles.

kappa

concentration parameter.

nu

circular variance, can be used in place of kappa.

Haar

logical; if TRUE density is evaluated with respect to the Haar measure.

lower.tail

logical; if TRUE (default), probabilities are P(X ≤ x) otherwise, P(X > x).

n

number of observations. If length(n)>1, the length is taken to be the number required.

Details

The matrix-Fisher distribution with concentration κ has density

C(r|κ)=exp[2κ cos(r)][1-cos(r)]/(2π[I0(2κ)-I1(2κ)])

with respect to Lebesgue measure where Ip() denotes the Bessel function of order p defined as Ip(κ). If kappa>354 then random deviates are generated from the Cayley distribution because they agree closely for large kappa and generation is more stable from the Cayley distribution.

For large κ, the Bessel functon gives errors so a large κ approximation to the matrix-Fisher distribution is used instead, which is the Maxwell-Boltzmann density.

Value

dfisher

gives the density

pfisher

gives the distribution function

rfisher

generates random deviates

See Also

Angular-distributions for other distributions in the rotations package.

Examples

r <- seq(-pi, pi, length = 500)

#Visualize the matrix Fisher density fucntion with respect to the Haar measure
plot(r, dfisher(r, kappa = 10), type = "l", ylab = "f(r)")

#Visualize the matrix Fisher density fucntion with respect to the Lebesgue measure
plot(r, dfisher(r, kappa = 10, Haar = FALSE), type = "l", ylab = "f(r)")

#Plot the matrix Fisher CDF
plot(r,pfisher(r,kappa = 10), type = "l", ylab = "F(r)")

#Generate random observations from matrix Fisher distribution
rs <- rfisher(20, kappa = 1)
hist(rs, breaks = 10)

rotations documentation built on June 25, 2022, 1:06 a.m.