# rvmf: Random values simulation from a von Mises-Fisher distribution In Directional: Directional Statistics

## Description

It generates random vectors following the von Mises-Fisher distribution. The data can be spherical or hyper-spherical.

## Usage

 `1` ```rvmf(n, mu, k) ```

## Arguments

 `n` The sample size. `mu` The mean direction. `k` 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.

## Details

It uses a rejection smapling as suggested by Andrew Wood (1994).

## Value

A matrix with the simulated data.

## Author(s)

Michail Tsagris

R implementation and documentation: Michail Tsagris <[email protected]> and Giorgos Athineou <[email protected]>

## 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

```vmf, rfb, racg, rvonmises, rmixvmf ```

## Examples

 ```1 2 3 4 5``` ```m <- rnorm(4) m <- m/sqrt(sum(m^2)) x <- rvmf(100, m, 25) m vmf(x) ```

### Example output

```[1]  0.4189666  0.1804410  0.6177589 -0.6405326
\$mu
[1]  0.4152269  0.1796496  0.6243394 -0.6367990

\$kappa
[1] 25.22431

\$MRL
[1] 0.9411476

\$vark
[1] 0.1299882

\$loglik
[1] 61.55579
```

Directional documentation built on July 12, 2018, 9:03 a.m.