# hierband: Solves main optimization problem for fixed lambda value In hierband: Convex Banding of the Covariance Matrix

## 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

 ```1 2``` ```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` `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.

`hierband.path` `hierband.cv`
 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15``` ```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) ```