sampling_a | R Documentation |
Generates a sample from the posterior distribution of a in the mixdpcluster model for bayesian clustering. The simulation is done via Metropolis-Hastings method.
sampling_a( n = 1, a.ini, b, alpha, d_0_a, d_1_a, mu_star_n_r, n.burn = 0, n.thin = 0, max.time = Inf, verbose = F, USING_CPP = TRUE )
n |
number of simulations to generate |
a.ini |
initialization value |
b |
parameter b in the posterior distribution of a |
alpha |
parameter α in the posterior distribution of a |
d_0_a |
parameter d_0^a in the posterior distribution of a |
d_1_a |
parameter d_1^a in the posterior distribution of a |
mu_star_n_r |
vector with number of observations allocated to each cluster |
n.burn |
number of iterations in the simulation considered in the burn-in period. |
n.thin |
number of iterations discarded between two simulated values (for thinning of the MCMC chain). |
max.time |
maximum allowed time for the simulation process. The function returns |
verbose |
if |
USING_CPP |
indicates usage of C++ in some modules. |
A list with two elements:
A numeric vector with the simulated values from the posterior distribution of a
A numeric vector with the simulated values from the posterior distribution of a
Carmona C., Nieto-Barajas L., Canale A. (2017). Model based approach for household clustering with mixed scale variables.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.