dvMF: Density function of von Mises-Fisher Distribution

Description Usage Arguments Examples

View source: R/vMF.R

Description

Density function for the von Mises-Fisher Distribution of dimension p with location parameter equal to mu and intensity parameter eta.

Usage

1
dvMF(z, theta, log.p = FALSE)

Arguments

z

is a matrix where each row is a spherical coordinate at which the density will be evaluated.

theta

is a vector of dimension 'p' such that eta*mu.

log.p

is logical; if TRUE, probabilities p are given as log(p).

Examples

1
2
3
4
5
6
7
8
# 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)) 

ahoundetoungan/PartialNetwork documentation built on Oct. 6, 2020, 1:51 a.m.