dVm: Density of the von Mises

View source: R/distributions.R

dVmR Documentation

Density of the von Mises

Description

Computes the density of a von Mises in a numerically stable way.

Usage

dVm(x, mu, kappa)

Arguments

x

evaluation angles, not necessary in [\pi,\pi).

mu

circular mean.

kappa

non-negative concentration parameter.

Value

A vector of the same length as x containing the density.

References

Jammalamadaka, S. R. and SenGupta, A. (2001) Topics in Circular Statistics. World Scientific, Singapore. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1142/4031")}

Examples

x <- seq(-pi, pi, l = 200)
plot(x, x, type = "n", ylab = "Density", ylim = c(0, 1))
for (i in 0:20) {
  lines(x, dVm(x = x, mu = 0, kappa = 5 * i / 20),
        col = rainbow(21)[i + 1])
}

egarpor/sdetorus documentation built on March 4, 2024, 1:23 a.m.