compareMultipleChains | R Documentation |
Compares multiples chains after each one of them has been post-processed by the RSP algorithm, so that all of them are switched into a similar labelling.
compareMultipleChains(rspObjectList, scheme, sa_loops, maxIter, threshold)
rspObjectList |
A list consisting of |
scheme |
Character argument with possible values: "exact" (default), "partial" or "full". |
sa_loops |
Number of simulated annealing loops (only applicable when "exact" is disabled). |
maxIter |
Max number of iterations. |
threshold |
Threshold for convergence. |
reorderedChains
: an object of class mcmc.list
containing all simultaneously processed chains.
Panagiotis Papastamoulis
# load 2 chains each one consisting of a # small mcmc sample of 100 iterations # with p=6 variables and q=2 factors. data(small_posterior_2chains) Nchains <- length(small_posterior_2chains) reorderedPosterior <- vector('list',length=Nchains) for(i in 1:Nchains){ reorderedPosterior[[i]] <- rsp_exact( lambda_mcmc = small_posterior_2chains[[i]], maxIter = 100, threshold = 1e-6, verbose=TRUE ) } # make them comparable makeThemSimilar <- compareMultipleChains(rspObjectList=reorderedPosterior)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.