ggb: ggb: Graph-Guided Banding for Covariance Estimation

Description Usage Arguments Details See Also Examples

View source: R/ggb.R

Description

This package implements the two methods introduced in Bien, J. (2018) "Graph-Guided Banding of the Covariance Matrix." Journal of the American Statistical Association. http://arxiv.org/abs/1606.00451

Computes the global or local GGB estimator (depending on type argument) along a grid of lambda values.

Usage

1
2
3
ggb(S, g, type = c("global", "local"), lambda = NULL, delta = NULL,
  flmin = 0.01, nlam = 20, max_depths = NULL, out_iter = 100,
  in_iter = 500, out_tol = 1e-04, in_tol = 1e-04, verbose = 0)

Arguments

S

p-by-p sample covariance matrix

g

seed graph (not necessarily connected)

type

either "global" or "local"

lambda

positive tuning parameter(s)

delta

lower bound on eigenvalues (default, NULL, means no bound)

flmin

ratio of smallest to largest lambda value (ignored if lambda is nonnull)

nlam

number of lambda values (ignored if lambda is nonnull)

max_depths

maximal bandwidth(s) considered. If type is "global", this must be a single non-negative integer. If type is "local", this must be a p-vector of non-negative integers. Default is NULL, which is equivalent to taking max_depths to be >= diameter(g). (These are referred to as M and M_j in the paper.)

out_iter

number of iterations of outer loop (i.e., # of eigenvalue decompositions). Ignored when delta is NULL.

in_iter

number of iterations on inner loop (i.e., # cycles over row/cols) when type is "local".

out_tol

convergence threshold for outer loop BCD (ignored when delta is NULL)

in_tol

convergence threshold for inner loop BCD when type is "local".

verbose

level of verbosity in printed output (3, 2, 1, 0)

Details

The main function is ggb.

To evaluate the proximal operator, it uses the "closed form" of Yan and Bien (2015) for the global GGB estimator as implemented in the R package hsm and uses blockwise coordinate descent for the local GGB estimator.

If delta is non-NULL, then alternates between evaluating proximal operator and projecting eigenvalues.

The weights used in this penalty are the square root of the group size.

See Also

cv_ggb

Examples

1
2
3
4
5
6
7
8
set.seed(123)
n <- 100
p <- 20
g <- igraph::graph.lattice(c(5, 4))
x <- matrix(rnorm(n * p), n, p)
S <- cov(x)
fit_global <- ggb(S, g, type = "global", nlam = 10)
fit_local <- ggb(S, g, type = "local", nlam = 10)

jacobbien/ggb documentation built on May 18, 2019, 8:01 a.m.