It generates random vectors following the von Mises-Fisher distribution. The data can be spherical or hyper-spherical.
rvmf(n, mu, k)
The sample size.
The mean direction, a unit vector.
The concentration parameter. If k = 0, random values from the spherical uniform will be drwan. Values from a multivariate normal distribution with zero mean vector and the identity matrix as the covariance matrix. Then each vector becomes a unit vector.
It uses a rejection smapling as suggested by Andrew Wood (1994).
A matrix with the simulated data.
Michail Tsagris and Manos Papadakis
R implementation and documentation: Michail Tsagris <firstname.lastname@example.org> and Manos Papadakis <email@example.com>
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
1 2 3 4 5
Loading required package: Rcpp Loading required package: RcppZiggurat  0.02946966 -0.54375567 -0.76229830 -0.34980367
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.