# bootstrapEMBatMix: Bootstrap the Batschelet mixture parameters In keesmulder/flexcircmix: Fit Mixtures of Flexible Circular Distributions

## Description

Bootstrap the Batschelet mixture parameters

## Usage

 ```1 2 3 4``` ```bootstrapEMBatMix(x, B = 500, parallel = TRUE, verbose = FALSE, 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, optimization_its = 10) ```

## Arguments

 `x` Numeric; A set angles in radians. `B` Integer; The number of bootstrap samples. `parallel` Logical; Whether to perform bootstraps in parallel. `verbose` Logical; Whether to print debug info. `bat_type` Either 'inverse' or 'power', the type of distribution to fit. The two distributions are similar, but the power Batschelet distribution is computationally much less demanding. `n_comp` Integer; Fixed number of components to estimate. `init_pmat` A numeric matrix with `n_comp` rows and four columns, corresponding to μ, κ, λ, α, in that order. Gives starting values for the parameters. If any element is `NA`, it will be given a default starting value. For mu, the default starting values are equally spaced on the circle. For κ, the default starting value is 5. For λ, the default starting value is 0, which corresponds to the von Mises distribution. For α, the default starting value is `1/n_comp`. `fixed_pmat` A numeric matrix with `n_comp` rows and four columns, corresponding to μ, κ, λ, α, in that order. Any element that is not `NA` in this matrix will be held constant at the given value and not sampled. `ll_tol` The likelihood tolerance for the EM-algorithm. `max_its` The maximum number of E-M iterations for the EM-algorithm. `optimization_its` The maximum number of maximization iterations within the EM-algorithm.

## Value

A matrix of sampled bootstrap values.

## Examples

 ```1 2 3``` ```x <- rinvbatmix(100) bootstrapEMBatMix(x, B = 5, parallel = FALSE) ```

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