Description Usage Arguments Details Value Examples
View source: R/hbfm_functions.R
Function used to combine and analyze MCMC results from one or more sets of
correlation samples generated by the hbfm.fit
function.
1 | corr.est(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 correlation estimate is determined by calculating the average of the posterior samples for each gene-gene pair.
To determine whether the correlation is significant, a 95% credible interval (CI) is determined from the posterior samples. If the CI includes 0, the correlation is deemed to be non-significant and the "CI.eval" element is FALSE. If the CI does not include 0, the correlation is considered significant and the "CI.eval" element is TRUE.
An alternative measurement of significance is the approximate "p-value" calculation, which is output in the "p.val" matrix. This "p-value" is determined by finding the smallest "a" value such that the 100(1-a)% CI contains 0. The corresponding "a" value represents the proportion of posterior distribution that is outside the smallest credible interval that contains 0.
In most cases a significant 95% CI from "CI.eval" will correspond with an approximate "p-value" < 0.05 from "p.val".
hbfm.corr-class object containing:
corr: symmetric estimated correlation matrix generated from MCMC samples
CI.low: symmetric matrix representing the lower bound of the 95% credible intervals (CI) generated from the MCMC samples
CI.upp: symmetric matrix representing the upper bound of the 95% credible intervals (CI) generated from the MCMC samples
CI.eval: symmetric logical matrix generated from 95% credible intervals (CI) from MCMC samples; TRUE means 95% CI does not include 0 (i.e., significant correlation)
p.val: symmetric matrix consisting of approximate "p-values" generated from MCMC samples
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ## 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
fit.corr <- corr.est(list(fit.res1))
print(fit.corr)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.