Description Usage Arguments Details Value References Examples
View source: R/hbfm_functions.R
Function to calculate the Deviance Information Criterion (DIC) from hbfm.fit
output.
1 | hbfm.DIC(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 |
For each of the final M.save
iterations of the MCMC, hbfm.fit
calculates the log marginal likelihood, log(ML).
The DIC is calculated with the formula: DIC = mean(D) + pD; where D = -2*log(ML) and pD = var(D)/2.
DIC of hbfm with Fac
number of factors
Gelman, A., Carlin, J. B., Stern, H. S., & Rubin, D. B. (2004). Bayesian Data Analysis: 2nd Edition. Chapman and Hall/CRC.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## 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)
## Obtain estimated gene-gene correlations from MCMC samples
hbfm.DIC(list(fit.res1))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.