vonMises: von Mises distribution

View source: R/directional.R

vonMisesR Documentation

von Mises distribution

Description

Returns the probability density of a von Mises distribution, which describes probability distributions on a circle using the following density function:

\frac{\exp(κ\cos(x-μ))}{2π I_0(κ)}

where I_0(κ) is a zero order Bessel function.

Usage

vonMises(a, mu = 0, kappa = 1, degrees = FALSE)

Arguments

a

angle(s), scalar or vector

mu

scalar containing the mean direction

kappa

scalar containing the concentration parameter

degrees

TRUE for degrees, FALSE for radians

Value

a scalar or vector of the same length as angles

Examples

plot(x=c(-1,1.2),y=c(-1,1.2),type='n',
     axes=FALSE,ann=FALSE,bty='n',asp=1)
a <- seq(from=-pi,to=pi,length.out=200)
d <- vonMises(a=a,mu=pi/4,kappa=5)
symbols(x=0,y=0,circles=1,add=TRUE,inches=FALSE,xpd=NA,fg='grey50')
lines(x=(1+d)*cos(a),y=(1+d)*sin(a),xpd=NA)

geostats documentation built on Jan. 7, 2023, 5:32 p.m.

Related to vonMises in geostats...