rvMF | R Documentation |
Random generation for the von Mises-Fisher distribution
of dimension p
with location parameter mu
and intensity parameter eta
(see Wood, 1994; Mardia, 2014).
rvMF(size, theta)
size |
is the number of simulations. |
theta |
is the parameter as |
A matrix whose each row is a random draw from the distribution.
# Draw 10 vectors from vMF with parameters eta = 1 and mu = c(1,0)
rvMF(10,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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.