Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

rvmf

Simulation of random values from rotationally symmetric distributions


Description

Simulation of random values from rotationally symmetric distributions. The data can be spherical or hyper-spherical.

Usage

rvmf(n, mu, k)
riag(n, mu)

Arguments

n

The sample size.

mu

A unit vector showing the mean direction for the von Mises-Fisher distribution. The mean vector of the Independent Angular Gaussian distribution. This does not have to be a unit vector.

k

The concentration parameter of the von Mises-Fisher distribution. If k = 0, random values from the spherical uniform will be drwan.

Details

The von Mises-Fisher uses the rejection smapling suggested by Andrew Wood (1994). For the Independent Angular Gaussian, values are generated from a multivariate normal distribution with the given mean vector and the identity matrix as the covariance matrix. Then each vector becomes a unit vector.

Value

A matrix with the simulated data.

Author(s)

Michail Tsagris

R implementation and documentation: Michail Tsagris mtsagris@uoc.gr and Giorgos Athineou <gioathineou@gmail.com>

References

Wood A. T. A. (1994). Simulation of the von Mises Fisher distribution. Communications in statistics-simulation and computation, 23(1): 157–164.

Dhillon I. S. & Sra S. (2003). Modeling data using directional distributions. Technical Report TR-03-06, Department of Computer Sciences, The University of Texas at Austin. http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.75.4122&rep=rep1&type=pdf

See Also

Examples

m <- rnorm(4)
m <- m/sqrt(sum(m^2))
x <- rvmf(100, m, 25)
m
vmf.mle(x)

Directional

A Collection of R Functions for Directional Data Analysis

v4.9
GPL-2
Authors
Michail Tsagris, Giorgos Athineou, Anamul Sajib, Eli Amson, Micah J. Waldstein
Initial release
2021-03-26

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.