sampling_a: MCMC sampling of parameter "a" in the _mixdpcluster_ model...

Description Usage Arguments Value References

View source: R/sampling_a.R

Description

Generates a sample from the posterior distribution of a in the mixdpcluster model for bayesian clustering. The simulation is done via Metropolis-Hastings method.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
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
)

Arguments

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 Error if exceeded.

verbose

if T, the function reports extra information on progress.

USING_CPP

indicates usage of C++ in some modules.

Value

A list with two elements:

$a.chain

A numeric vector with the simulated values from the posterior distribution of a

$accept.indic

A numeric vector with the simulated values from the posterior distribution of a

References

Carmona C., Nieto-Barajas L., Canale A. (2017). Model based approach for household clustering with mixed scale variables.


BNPMIXcluster documentation built on Nov. 30, 2020, 5:07 p.m.