FastBandChol-package {FastBandChol} | R Documentation |
Fast and numerically stable estimation of covariance matrix by banding the Cholesky factor using a modified Gram-Schmidt algorithm implemented in RcppArmadilo. See <https://stat.umn.edu/~molst029> for details on the algorithm.
Package: | FastBandChol |
Type: | Package |
Version: | 0.1.0 |
Date: | 2015-08-22 |
License: | GPL-2 |
Aaron Molstad
Rothman, A.J., Levina, E., and Zhu, J. (2010). A new approach to Cholesky-based covariance regularization in high dimensions. Biometrika, 97(3):539-550.
## set sample size and dimension n = 20 p = 100 ## create covariance with AR1 structure Sigma = matrix(0, nrow=p, ncol=p) for(l in 1:p){ for(m in 1:p){ Sigma[l,m] = .5^(abs(l-m)) } } ## simulation Normal data eo1 = eigen(Sigma) Sigma.sqrt = eo1$vec%*%diag(eo1$val^.5)%*%t(eo1$vec) X = t(Sigma.sqrt%*%matrix(rnorm(n*p), nrow=p, ncol=n)) ## compute estimates est.sample = banded.sample(X, bandwidth=4)$est est.chol = banded.chol(X, bandwidth=4)$est