Learn R Programming

equSA (version 1.1.5)

solcov: Calculate covariance matrix and precision matrix

Description

Calculate the adjusted covriance matrix and precision matrix given the network structure from high dimesional dataset.

Usage

solcov(data, struct, tol=10^-5)

Arguments

data

A nxp data matrix.

struct

A preacquired adjacency matrix

tol

Tolerant value, default is 10^-5

Value

A list of two elements:

COV

Adjusted covriance matrix

PRE

Precision matrix

%% ...

References

Friedman, J., Hastie, T., & Tibshirani, R. (2001). The elements of statistical learning (Vol. 1). Springer, Berlin: Springer series in statistics.

Examples

Run this code
# NOT RUN {
library(equSA)
data(SR0)
data(SR0_mat)
subSR0 <- SR0[1:10,1:10]
subSR0_mat <- SR0_mat[1:10,1:10]
solcov(subSR0, subSR0_mat) 
      
# }
# NOT RUN {
      
# }
# NOT RUN {
           # library(equSA)
           # data(SR0)
           #  data(SR0_mat)
           # solcov(SR0, SR0_mat)
      
# }

Run the code above in your browser using DataLab