# dbatmix: The Batschelet-type Mixture distribution In keesmulder/flexcircmix: Fit Mixtures of Flexible Circular Distributions

## Description

The Batschelet-type Mixture distribution

## Usage

 ```1 2 3 4 5 6 7 8 9``` ```dbatmix(x, dbat_fun = dinvbat, mus = c(-pi/2, 0, pi/2), kps = c(8, 8, 8), lams = c(-0.5, 0, 0.5), alphs = c(0.3, 0.4, 0.3), log = FALSE) dbatmix_pmat(x, dbat_fun = dinvbat, pmat = cbind(mu = c(-pi/2, 0, pi/2), kp = c(8, 8, 8), lam = c(-0.5, 0, 0.5), alph = c(0.3, 0.4, 0.3)), log = FALSE) rinvbatmix(n, mus = c(-pi/2, 0, pi/2), kps = c(8, 8, 8), lams = c(-0.5, 0, 0.5), alphs = c(0.3, 0.4, 0.3)) ```

## Arguments

 `x` An angle in radians. `dbat_fun` A function that provides the pdf function of the desired `mus` A vector of component mean directions. `kps` A vector of nonnegative concentration parameters. `lams` A vector of shape parameters. `alphs` A vector of component weights. Batschelet density. By default, inverse Batschelet. `log` Logical; indicates if the logarithm of the density must be return. `pmat` A `k*4` matrix of parameters for `dbatmix_pmat`. `n` The number of data points to sample.

## Value

For `dbatmix` and `dbatmix_pmat`, vector of probabilities. For `rinvbatmix`, a vector of random variates from the mixture of the inverse Batschelet distribution.

## Functions

• `dbatmix_pmat`: A version that takes a parameter matrix as input.

• `rinvbatmix`: Random variate generation for Inverse Batschelet mixtures.

## Examples

 ```1 2 3 4 5``` ```x <- rinvbat(10) dbatmix(x) curve(dbatmix(x), -pi, pi) curve(dbatmix(x, dbat_fun = dpowbat), -pi, pi) ```

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