dvMF | R Documentation |
Density function for the von Mises-Fisher distribution
of dimension p
with location parameter equal to mu
and intensity parameter eta
.
dvMF(z, theta, log.p = FALSE)
z |
is a matrix where each row is a spherical coordinate at which the density will be evaluated. |
theta |
is a vector of dimension |
log.p |
is logical; if TRUE, probabilities p are given as log(p). |
the densities computed at each point.
# Draw 1000 vectors from vMF with parameter eta = 1 and mu = c(1,0)
z <- rvMF(1000, c(1,0))
# Compute the density at z
dvMF(z, c(1,0))
# Density of c(0, 1, 0, 0) with the parameter eta = 3 and mu = c(0, 1, 0, 0)
dvMF(matrix(c(0, 1, 0, 0), nrow = 1), c(0, 3, 0, 0))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.