Description Usage Arguments Details Value Author(s) References See Also Examples
View source: R/ggm.estimate.pcor.R
ggm.estimate.pcor
offers an interface to two related shrinkage estimators
of partial correlation. Both are fast, statistically efficient, and can be used for
analyzing small sample data.
The default method "statics" employs the function
pcor.shrink
whereas the "dynamic" method relies on
dyn.pcor
(in the longitudinal
package). The difference between the two estimators
is that the latter takes the spacings between time points into account
if the input are multiple time course data (these must be provided as
longitudinal
object).
1 | ggm.estimate.pcor(x, method = c("static", "dynamic"), ...)
|
x |
data matrix (each rows corresponds to one multivariate observation) |
method |
method used to estimate the partial correlation matrix. Available options are "static" (the default) and "dynamic" - both are shrinkage methods. |
... |
options passed to |
For details of the shrinkage estimators we refer to Opgen-Rhein and Strimmer (2006a,b)
and Sch\"afer and Strimmer (2005), as well as to the manual pages of
pcor.shrink
(in the corpcor
package) and dyn.pcor
(in the longitudinal
package).
Previously, this function offered several furthers options. The old option called "shrinkage" corresponds to the present "static" option. The other old options "observed.pcor", "partial.bagged.cor", and "bagged.pcor" are now considered obselete and have been removed.
An estimated partial correlation matrix.
Rainer Opgen-Rhein, Juliane Sch\"afer, and Korbinian Strimmer (https://strimmerlab.github.io).
Opgen-Rhein, R., and K. Strimmer. 2006a. Inferring gene dependency networks from genomic longitudinal data: a functional data approach. REVSTAT 4:53-65.
Opgen-Rhein, R., and K. Strimmer. 2006b. Using regularized dynamic correlation to infer gene dependency networks from time-series microarray data. The 4th International Workshop on Computational Systems Biology, WCSB 2006 (June 12-13, 2006, Tampere, Finland).
Sch\"afer, J., and Strimmer, K. (2005). A shrinkage approach to large-scale covariance estimation and implications for functional genomics. Statist. Appl. Genet. Mol. Biol. 4:32. <DOI:10.2202/1544-6115.1175>
ggm.simulate.data
, ggm.estimate.pcor
,
pcor.shrink
, and dyn.pcor
(in the longitudinal
package)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | ## Not run:
# load GeneNet library
library("GeneNet")
# generate random network with 40 nodes
# it contains 780=40*39/2 edges of which 5 percent (=39) are non-zero
true.pcor <- ggm.simulate.pcor(40)
# simulate data set with 40 observations
m.sim <- ggm.simulate.data(40, true.pcor)
# simple estimate of partial correlations
estimated.pcor <- cor2pcor( cor(m.sim) )
# comparison of estimated and true values
sum((true.pcor-estimated.pcor)^2)
# a slightly better estimate ...
estimated.pcor.2 <- ggm.estimate.pcor(m.sim)
sum((true.pcor-estimated.pcor.2)^2)
## End(Not run)
|
Loading required package: corpcor
Loading required package: longitudinal
Loading required package: fdrtool
[1] 815.7756
Estimating optimal shrinkage intensity lambda (correlation matrix): 0.4113
[1] 10.07027
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.