rvMF: Simulation from von Mises-Fisher Distribution

Description Usage Arguments References Examples

View source: R/vMF.R

Description

Random generation for the von Mises-Fisher Distribution of dimension p with location parameter mu and intensity parameter eta (see Wood, 1994; Mardia, 2014).

Usage

1
rvMF(size, theta)

Arguments

size

is the number of simulations.

theta

is the parameter as eta*mu.

References

Hornik, K., & GrĂ¼n, B. (2014). movMF: An R package for fitting mixtures of von Mises-Fisher distributions. Journal of Statistical Software, 58(10), 1-31. https://epub.wu.ac.at/4893/.

Mardia, K. V. (2014). Statistics of directional data. Academic press. https://www.elsevier.com/books/statistics-of-directional-data/mardia/978-0-12-471150-1.

Wood, A. T. (1994). Simulation of the von Mises-Fisher distribution. Communications in statistics-simulation and computation, 23(1), 157-164. https://www.tandfonline.com/doi/abs/10.1080/03610919408813161.

Examples

1
2
3
4
5
6
7
8
9
# Draw 1000 vectors from vMF with parameters eta = 1 and mu = c(1,0)
rvMF(1000,c(1,0))

# Draw 10 vectors from vMF with parameters eta = sqrt(14) and mu proportional to (2,1,3)
rvMF(10,c(2,1,3))

# Draw from the vMF distribution with mean direction proportional to c(1, -1)
# and concentration parameter 3
rvMF(10, 3 * c(1, -1) / sqrt(2))

ahoundetoungan/PartialNetwork documentation built on Oct. 6, 2020, 1:51 a.m.