bat_mix: Posterior of mixture of Power or Inverse Batschelet...

Description Usage Arguments Value Examples

Description

Posterior of mixture of Power or Inverse Batschelet distributions.

Usage

1
2
3
4
bat_mix(th, bat_type = "power", n_comp = 3,
  mu_logprior_fun = function(mu) 0, kp_logprior_fun = function(kp) 0,
  lam_logprior_fun = function(lam) 0, alph_prior_param = rep(1,
  n_comp), fixed_pmat = matrix(NA, n_comp, 4), niter = 1000, ...)

Arguments

th

Circular observations, either numeric in radians, or circular.

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.

mu_logprior_fun

Function; A function with a single argument, which returns the log of the prior probability of μ. Defaults to a uniform prior function.

kp_logprior_fun

Function; A function with a single argument, which returns the log of the prior probability of κ. Defaults to a uniform prior function. In contrast to the other parameters, for κ the constant (uniform) prior is improper.

lam_logprior_fun

Function; A function with a single argument, which returns the log of the prior probability of λ. Defaults to a uniform prior function.

alph_prior_param

Integer vector; The mixture weight parameter vector α is given its conjugate Dirichlet prior. The default is rep(1, n_comp), which is the noninformative uniform prior over the n_comp simplex.

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.

niter

Number of iterations to perform MCMC for.

...

Further arguments passed to circglmbayes::fitbatmix.

Value

Object of type bat_mix_mod.

Examples

1
bat_mix(rvm(30, 2, 5))

keesmulder/circbayes documentation built on May 30, 2019, 2:04 p.m.