vonMises {geostats} | R 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(\kappa\cos(x-\mu))}{2\pi I_0(\kappa)}
where I_0(\kappa)
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 |
|
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)
[Package geostats version 1.6 Index]