Learn R Programming

hierband (version 1.0)

hierband: Solves main optimization problem for fixed lambda value

Description

Solves the main optimization problem appearing in Bien, Bunea, & Xiao (2015): $$min_P || Sighat - P ||_F^2 + lam * sum_l || (W_l * P)_{g_l} ||_2$$ where g_l are the outermost l(l+1) elements of a square matrix. and || (W_l * P)_{g_l} ||^2 = sum_{m<=l} w_{lm}^2="" ||p_{s_m}||^2.="" if="" a="" non-null="" delta is provided, then a constraint of the form $P >= delta I_p$ is included. Problem is solved by performing blockwise coordinate descent on the dual problem. See paper for more explanation.

Usage

hierband(Sighat, lam, w = NULL, delta = NULL, maxiter = 100,
  tol = 1e-07)

Arguments

Sighat
The sample covariance matrix
lam
Non-negative penalty parameter. Controls sparsity level.
w
(p-1)-by-(p-1) lower-triangular matrix (above diagonal ignored). w[l,] gives the l weights for g_l. Defaults to w[l,m]=sqrt(2 * l)/(l - m + 1) for m <= l<="" code="">
delta
Lower bound on eigenvalues. If this is NULL (which is default), then no eigenvalue constraint is included.
maxiter
Number of iterations of blockwise coordinate descent to perform.
tol
Only used when delta is non-NULL. When no eigenvalue changes by more than tol in BCD, convergence is assumed.

Value

  • Returns the convex banded estimate of covariance.

See Also

hierband.path hierband.cv

Examples

Run this code
set.seed(123)
p <- 100
n <- 50
K <- 10
true <- ma(p, K)
x <- matrix(rnorm(n*p), n, p) %*% true$A
Sighat <- cov(x)
fit <- hierband(Sighat, lam=0.4)
min(eigen(fit)$values)
fit2 <- hierband(Sighat, lam=0.4, delta=0.2)
min(eigen(fit2)$values)
# Use cross validation to select lambda:
path <- hierband.path(Sighat)
cv <- hierband.cv(path, x)
fit <- hierband(Sighat, lam=cv$lam.best)

Run the code above in your browser using DataLab