band.chol {PDSCE}R Documentation

Computes the banded covariance estimator by banding the covariance Cholesky factor

Description

Computes the kk-banded covariance estimator by kk-banding the covariance Cholesky factor as described by Rothman, Levina, and Zhu (2010).

Usage

band.chol(x, k, centered = FALSE, method = c("fast", "safe"))

Arguments

x

A data matrix with nn rows and pp columns. The rows are assumed to be a realization of nn independent copies of a pp-variate random vector.

k

The banding parameter (the number of sub-diagonals to keep as non-zero). Should be a non-negative integer.

centered

Logical: centered=TRUE should be used if the columns of x have already been centered.

method

The method to use. The default is method="fast", which uses the Grahm-Schmidt style algorithm and must have kmin(n2,p1)k \leq \min(n-2, p-1). Alternatively, method="safe" uses an inverse or generalized inverse to compute estimates of the regression coefficients and is more numerically stable (and capable of handling k{0,,p1}k \in \{0,\ldots,p-1\} regardless of nn).

Details

method="fast" is much faster than method="safe". See Rothman, Levina, and Zhu (2010).

Value

The banded covariance estimate (a pp by pp matrix).

Author(s)

Adam J. Rothman

References

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.

See Also

band.chol.cv

Examples

set.seed(1)
n=50
p=20
true.cov=diag(p)
true.cov[cbind(1:(p-1), 2:p)]=0.4
true.cov[cbind(2:p, 1:(p-1))]=0.4
eo=eigen(true.cov, symmetric=TRUE)
z=matrix(rnorm(n*p), nrow=n, ncol=p)
x=z%*% tcrossprod(eo$vec*rep(eo$val^(0.5), each=p),eo$vec)
sigma=band.chol(x=x, k=1)
sigma 

[Package PDSCE version 1.2.1 Index]