band.chol.cv: Banding parameter selection for banding the covariance...

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/band.chol.cv.R

Description

Selects the banding parameter and computes the banded covariance estimator by banding the covariance Cholesky factor as described by Rothman, Levina, and Zhu (2010).

Usage

1
2
band.chol.cv(x, k.vec = NULL, method = c("fast", "safe"), nsplits = 10, 
             n.tr = NULL, quiet = TRUE)

Arguments

x

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

k.vec

An optional vector of candidate banding parameters (the possible number of sub-diagonals to keep as non-zero). The default is the long vector 0:min(n-2, p-1).

method

The method to use. The default is method="fast", which uses the Grahm-Schmidt style algorithm and must have k ≤q \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 \in \{0,…,p-1\} regardless of n).

nsplits

Number of random splits to use for banding parameter selection.

n.tr

Optional number of cases to use in the training set. The default is the nearest integer to n(1-1/\log(n)). The value must be in \{3, …, n-2\}.

quiet

Logical: quiet=TRUE suppresses the printing of progress updates.

Details

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

Value

A list with

sigma

the covariance estimate at the selected banding parameter

best.k

the selected banding parameter

cv.err

the vector of validation errors, one for each entry in k.vec

k.vec

the vector of candidate banding parameters

n.tr

The number of cases used for the training set

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
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)
cv.out=band.chol.cv(x=x)
plot(cv.out$k.vec, cv.out$cv.err)
cv.out$best.k
cv.out$sigma

PDSCE documentation built on May 29, 2017, 12:30 p.m.