Learn R Programming

cylcop (version 0.2.0)

mle.vonmisesmix: Mixed von Mises Maximum Likelihood Estimates

Description

Computes the maximum likelihood estimates for the parameters of a mixed von Mises distribution: the mean directions, the concentration parameters, and the proportions of the distributions. The code is a simplified version of movMF::movMF() with the added feature of optionally fixed mean directions Hornik2014cylcop.

Usage

mle.vonmisesmix(theta, mu = NULL, ncomp = 2)

Value

A list containing the optimized parameters mu, kappa, and prop.

Arguments

theta

numeric vector of angles.

mu

(optional) numeric vector of length ncomp holding the mean directions (angles). If not specified the mean directions are estimated.

ncomp

positive integer specifying the number of components of the mixture model.

Details

The function complements the 'circular' package, which provides functions to make maximum likelihood estimates of e.g. von Mises (circular::mle.vonmises()), or wrapped Cauchy distributions (circular::mle.wrappedcauchy())

References

Hornik2014cylcop.

See Also

movMF::movMF(), circular::mle.vonmises(), dvonmisesmix(), qvonmisesmix().

Examples

Run this code
set.seed(123)

n <- 10
angles <- rvonmisesmix(n,
  mu = c(0, pi),
  kappa = c(2, 1),
  prop = c(0.4,0.6)
)
mle.vonmisesmix(theta = angles)
mle.vonmisesmix(theta = angles, mu = c(0, pi))

Run the code above in your browser using DataLab