cor.fit.mixture {GeneTS} | R Documentation |
cor.fit.mixture
fits a mixture model
f(r) = eta0 dcor0(r, kappa) + etaA dunif(r, -1, 1)
to a vector of empirical partial correlation coefficients using likelihood maximization.
This allows to estimates both the degree of freedom kappa
in the
null-distribution and the proportion eta0 of null r-values (note that etaA = 1-eta0).
cor.prob.nonzero
computes
etaA dunif(r, -1, 1)/f(r)
,
i.e. the posterior probability that the true correlation is non-zero given the empirical correlation r, the degree of freedom of the null-distribution kappa, and the prior eta0 for the null-distribution.
cor.fit.mixture(r, MAXKAPPA=5000) cor.prob.nonzero(r, kappa, eta0)
r |
vector of sample correlations |
kappa |
the degree of freedom of the null distribution |
eta0 |
the proportion of true null r-values (=the prior) |
MAXKAPPA |
upper bound for the estimated kappa (default: MAXKAPPA=5000) |
The above functions are useful to determine the null-distribution of edges in a sparse graphical Gaussian model, see Schaefer and Strimmer (2003) for more details and an application to infer genetic networks from microarray data.
A list object with the following components:
kappa |
the degree of freedom of the null distribution |
eta0 |
the prior for the null distribution, i.e. the proportion of null r-values |
logL |
the maximized log-likelihood |
Juliane Schaefer (http://www.stat.uni-muenchen.de/~schaefer/) and Korbinian Strimmer (http://www.stat.uni-muenchen.de/~strimmer/).
Schaefer, J., and Strimmer, K. (2003). A practical approach to inferring large graphical models from sparse microarray data. Submitted to Bioinformatics [preprint available online].
dcor0
, cor0.estimate.kappa
,
kappa2N
, fdr.estimate.eta0
.
# load GeneTS library library(GeneTS) # simulate mixture distribution r <- rcor0(700, kappa=10) u <- runif(200, min=-1, max=1) rc <- c(r,u) # estimate kappa and eta0 (=7/9) cor.fit.mixture(r) cor.fit.mixture(rc) # for comparison cor0.estimate.kappa(r) cor0.estimate.kappa(rc) # posterior probabilities r <- seq(-1,1, .01) post.prob <- cor.prob.nonzero(r,kappa=10,eta0=7/9) plot(r, post.prob, type="l")