R: Dynamical Correlation and Covariance

dyn.cor {longitudinal} | R Documentation

## Dynamical Correlation and Covariance

### Description

The functions estimate dynamical correlation and covariance, and related quantities.

### Usage

    dyn.cor(x, lambda, verbose=TRUE)
    dyn.var(x, lambda.var, verbose=TRUE)
    dyn.cov(x, lambda, lambda.var, verbose=TRUE)
    dyn.invcor(x, lambda, verbose=TRUE)
    dyn.invcov(x, lambda, lambda.var, verbose=TRUE)
    dyn.pvar(x, lambda, lambda.var, verbose=TRUE)
    dyn.pcor(x, lambda, verbose=TRUE)

### Arguments

`x` | a data matrix
`lambda` | the correlation shrinkage intensity (range 0-1). If `lambda` is not specified (the default) it is estimated using an analytic formula from Sch\"afer and Strimmer (2005) and Opgen-Rhein and Strimmer (2006a,b). For `lambda=0` the empirical correlations are recovered. See also `cor.shrink`.
`lambda.var` | the variance shrinkage intensity (range 0-1). If `lambda.var` is not specified (the default) it is estimated using an analytic formula from Sch\"afer and Strimmer (2005) and Opgen-Rhein and Strimmer (2006a,b). For `lambda.var=0` the empirical variances are recovered. See also `var.shrink`.
`verbose` | report progress while computing (default: TRUE)

### Details

The dynamical correlation and related quantities implemented here follow the definition of Opgen-Rhein and Strimmer (2006a,b). This approach is derived from a FDA perspective. Essentially, it takes account of the distances between the various time points by assigning weights to samples. If these weights are all equal the usual iid estimators are obtained.

For details about the analytic shrinkage procedure consult Opgen-Rhein and Strimmer (2006b) and Sch\"afer and Strimmer (2005) as well as the help page of `cov.shrink`.

### Value

`dyn.cor` returns the dynamical correlation matrix. `dyn.var` returns the vector of dynamical variances. `dyn.cov` returns the dynamical covariance matrix.

`dyn.invcor` returns the inverse dynamical correlation matrix. `dyn.invcov` returns the inverse dynamical covariance matrix.

`dyn.pvar` returns the vector of partial dynamical variances. `dyn.pcor` returns the partial dynamical correlation matrix.

### Author(s)

Rainer Opgen-Rhein and Korbinian Strimmer (http://strimmerlab.org).

### References

Opgen-Rhein, R., and K. Strimmer. 2006a. Inferring gene dependency networks from genomic longitudinal data: a functional data approach. REVSTAT 4:53-65. (http://www.ine.pt/revstat/pdf/rs060103.pdf)

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). (http://www.cs.tut.fi/wcsb06/)

Schaefer, 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. (http://www.bepress.com/sagmb/vol4/iss1/art32/)

### See Also

`dyn.weights`, `cov.shrink`, `pcor.shrink`

### Examples

    # load "longitudinal" library
    library("longitudinal")

    # load tcell data
    data(tcell)
    get.time.repeats(tcell.34)

    # dynamical partial correlation
    # (this takes into account of the unequal spacings between time points)
    dynpc <- dyn.pcor(tcell.34, lambda=0)

    # static partial correlation
    statpc <- pcor.shrink(tcell.34, lambda=0)

    # this is NOT the same
    sum((dynpc - statpc)^2)

[Package longitudinal version 1.1.12 Index]