Learn R Programming

VGAM (version 1.1-14)

vonmises: von Mises Distribution Family Function

Description

Estimates the location and scale parameters of the von Mises distribution by maximum likelihood estimation.

Usage

vonmises(llocation = "extlogitlink(min = 0, max = 2*pi)",
         lscale = "loglink", ilocation = NULL, iscale = NULL,
         imethod = 1, zero = NULL)

Arguments

Value

An object of class "vglmff"

(see vglmff-class). The object is used by modelling functions such as vglm,

rrvglm

and vgam.

Details

The (two-parameter) von Mises is the most commonly used distribution in practice for circular data. It has a density that can be written as $$f(y;a,k) = \frac{\exp[k\cos(y-a)]}{ 2\pi I_0(k)}$$ where \(0 \leq y < 2\pi\), \(k>0\) is the scale parameter, \(a\) is the location parameter, and \(I_0(k)\) is the modified Bessel function of order 0 evaluated at \(k\). The mean of \(Y\) (which is the fitted value) is \(a\) and the circular variance is \(1 - I_1(k) / I_0(k)\) where \(I_1(k)\) is the modified Bessel function of order 1. By default, \(\eta_1=\log(a/(2\pi-a))\) and \(\eta_2=\log(k)\) for this family function.

References

Forbes, C., Evans, M., Hastings, N. and Peacock, B. (2011). Statistical Distributions, Hoboken, NJ, USA: John Wiley and Sons, Fourth edition.

See Also

Bessel, cardioid2.

CircStats and circular currently have a lot more R functions for circular data than the VGAM package.

Examples

Run this code
vdata <- data.frame(x2 = runif(nn <- 1000))
vdata <- transform(vdata,
                   y = rnorm(nn, 2+x2, exp(0.2)))  # Bad data!!
fit <- vglm(y  ~ x2, vonmises(zero = 2), vdata, trace = TRUE)
coef(fit, matrix = TRUE)
Coef(fit)
with(vdata, range(y))  # Original data
range(depvar(fit))     # Processed data is in [0,2*pi)

Run the code above in your browser using DataLab