EM.u.vonmises: Expectation-maximization algorithm for mixture of uniform and...

Description Usage Arguments Value Examples

View source: R/Clustering.R

Description

For a vector of angles, will return the parameters of a mixture of von Mises distributions with one component constrained to be a continuous circular uniform distribution, using an EM algorithm.

Usage

1
EM.u.vonmises(x, k, max.runs = 1000, conv = 1e-05)

Arguments

x

Vector of angles to be fitted

k

Number of von Mises components to be fitted

max.runs

Maximum number of iterations to attempt. Default is 1000.

conv

Maximum difference in log-likelihood between successive iterations before convergence is considered to have occurred. Default is 0.00001.

Value

List containing k, with k estimates of mu, kappa, alpha (proportion of population belonging to each component), log-likelihood found, number of iterations required, and first 10 iterations. Can be passed to plot.EM.vonmises to be displayed graphically.

Examples

1
2
3
ex1 <- c(rvonmises(120 * 0.3, mu = circular(pi/2), kappa = 10),
         rvonmises(120 * 0.7, mu = circular(pi), kappa = 3))
em1 <- EM.vonmises(ex1, k = 2)

ClairBee/AS.circular documentation built on Jan. 24, 2020, 3:57 p.m.