Description Usage Arguments Value Examples
View source: R/mcmcBatschelet.R
MCMC sampling for Batschelet-type distributions.
1 2 3 4 5 6 7 8 | mcmcBatscheletMixture(x, Q = 1000, burnin = 0, thin = 1,
n_comp = 4, bat_type = "inverse", init_pmat = matrix(NA, n_comp,
4), fixed_pmat = matrix(NA, n_comp, 4), joint_kp_lam = FALSE,
kp_bw = 1, lam_bw = 0.05, mu_logprior_fun = function(mu) -log(2 *
pi), kp_logprior_fun = function(kp) 1,
lam_logprior_fun = function(lam) -log(2), alph_prior_param = rep(1,
n_comp), compute_variance = TRUE, compute_waic = FALSE,
verbose = 0)
|
x |
A numeric vector of angles, in radians |
Q |
Integer; The number of iterations to return after taking burn in and thinning into account. |
burnin |
Integer; The number of (non-thinned) iterations to discard. No burn in is performed by default. |
thin |
Integer; Number of iterations to sample for each saved iteration. Defaults to 1, which means no thinning. |
n_comp |
Integer; Fixed number of components to estimate. |
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. |
init_pmat |
A numeric matrix with |
fixed_pmat |
A numeric matrix with |
joint_kp_lam |
Logical; If |
kp_bw |
Numeric; A tuning parameter for kappa proposals. If |
lam_bw |
Numeric; the maximum distance from the current lambda at which uniform proposals are drawn. |
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
|
compute_variance |
Logical; Whether to add circular variance to the returned mcmc sample. |
compute_waic |
Logical; Whether to compute the WAIC. Can be
computationally demanding if |
verbose |
Integer up to 4; Determines the amount of printed debug information. |
A numeric matrix of sampled parameter values.
1 2 | x <- rinvbatmix(100)
mcmcBatscheletMixture(x, Q = 10)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.