Skip to contents

Density and random generation for the spherical normal distribution with mean and kappa.

Usage

rvmf(n = 100, mu = c(1, 0, 0), k = 5)

dvmf(x, mu, k = 5)

Source

Adapted fom rotasym::r_vMF() and rotasym::d_vMF()

Arguments

n

integer. number of random samples to be generated

k

numeric. The concentration parameter (\(\kappa\)) of the the von Mises-Fisher distribution

x, mu

numeric. Can be three element vector, three column array, or an object of class "line" or "plane"

See also

v_unif() for alternative algorithms to generate uniform distributed samples on a sphere, rkent() for Kent distribution.

Examples

# example code
x <- rvmf(100, mu = Line(120, 50), k = 5)
stereoplot()
stereo_point(x)