corr.est: Estimate the gene-gene correlation matrix from MCMC samples

Description Usage Arguments Details Value Examples

View source: R/hbfm_functions.R

Description

Function used to combine and analyze MCMC results from one or more sets of correlation samples generated by the hbfm.fit function.

Usage

1
corr.est(hbfm.list)

Arguments

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

Details

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".

Value

hbfm.corr-class object containing:

Examples

 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)

mnsekula/hbfm documentation built on June 29, 2020, 5:12 a.m.