The resampling method as part of the posterior inference under DIRECT
. It uses stored MCMC samples to generate realizations of the allocation probability matrix, and writes the realizations to a user-specified external file.
resampleClusterProb(file.out, ts, nitem, ntime, nrep,
pars.mcmc, cs.mcmc, alpha.mcmc, nstart, nres)
Samples of the allocation probability matrix are written to file *_mcmc_probs.out. This file contains a large matrix of \(HN \times K\), which is \(H\) posterior allocation probability matrices stacked up, each individual matrix of \(N \times K\), where \(H\) is the number of recorded MCMC samples, \(N\) the number of items and \(K\) the inferred number of mixture components.
Name of file containing samples of posterior allocation probability matrix.
A nitem
-by-ntime
-by-nrep
array of data.
Number of items.
Number of time points.
Number of replicates.
A matrix or data frame of MCMC samples of mean vectors and random effects stored in file *_mcmc_pars.out, one of the output files from DPMCMC
.
A matrix or data frame of MCMC samples of assignments of mixture components stored in file *_mcmc_cs.out, one of the output files from DPMCMC
.
A vector of MCMC samples of \(\alpha\), the concentration parameter in the Dirichlet-process prior, stored in the last column of file *_mcmc_cs.out, one of the output files from DPMCMC
.
Starting from which recorded MCMC sample.
How many times to draw resamples? Multiple samples are averaged.
Audrey Q. Fu
Fu, A. Q., Russell, S., Bray, S. and Tavare, S. (2013) Bayesian clustering of replicated time-course gene expression data with weak signals. The Annals of Applied Statistics. 7(3) 1334-1361.
DIRECT
for the complete method.
DPMCMC
for the MCMC sampler under the Dirichlet-process prior.
relabel
for relabeling in posterior inference.