batmixEM: Fit mixtures of inverse or power Batschelet distributions.

Description Usage Arguments Value Examples

View source: R/BatMixturesFitting.R

Description

Fit mixtures of inverse or power Batschelet distributions.

Usage

1
2
3
batmixEM(x, bat_type = "power", n_comp = 4, init_pmat = matrix(NA,
  n_comp, 4), fixed_pmat = matrix(NA, n_comp, 4), ll_tol = 0.1,
  max_its = 50, verbose = FALSE, optimization_its = 10)

Arguments

x

A dataset of angles in radians.

bat_type

String; Either "power" or "inverse", denoting the type of Batschelet distribution to employ.

n_comp

The number of components to be used in the mixture. This is fixed, so it can not be estimated.

init_pmat

An n_comp * 4 matrix, the initial values of the parameter matrix. The parameters are ordered mu, kp, lam and then alph.

fixed_pmat

An n_comp * 4 matrix, containing a parameter matrix, with NA for parameters to be estimated, and a numeric for each parameter that should be kept fixed to a specific value.

ll_tol

Numeric; the algorithm is stopped after the log-likelihood improves less than ll_tol.

max_its

The maximum number of iterations.

verbose

Logical; whether to print debug statements.

optimization_its

Integer; The maximum number of iterations to perform in the M-step (Maximization) part of the algorithm.

Value

A parameter matrix of results.

Examples

1
2
dat <- rinvbatmix(100)
batmixEM(dat, n_comp = 3)

keesmulder/flexcircmix documentation built on May 29, 2019, 3:02 a.m.