Description Usage Arguments Details Value Examples
View source: R/hbfm_functions.R
Function to rank the MCMC chains by average marginal log-likelihood.
1 | rank.chains(hbfm.list)
|
hbfm.list |
list where each element contains an hbfm.fit-class object; each element of the list contains an object from a different MCMC chain |
The rank.chains
function is used to rank the input chains based on average marginal log-likelihood in order to identify low performing chains.
data.frame that orders the input hbfm.fit-class objects based on average marginal log-likelihood; the numbers in the chain.num column represent the elements (chains) from hbfm.list
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ## Not run:
## Load dataset
data(gene.mat)
## Run stochastic EM first
## Consider F=5 factors
fit1 <- stoc.em(Y=gene.mat, Fac = 5)
## Run MCMC sampler with initial parameter values from stoc.em
fit.res1 <- hbfm.fit(fit1)
## Run a second chain
fit2 <- stoc.em(Y=gene.mat, Fac = 5, seed = 234)
fit.res2 <- hbfm.fit(fit2, seed = 234)
## Obtain estimated gene-gene correlations from MCMC samples
rank.chains(list(fit.res1, fit.res2))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.