lambda.bound: Generate a log-spaced lasso penalty sequence for 'space()'

View source: R/matSPACE.R

lambda.boundR Documentation

Generate a log-spaced lasso penalty sequence for space()

Description

Computes a decreasing, log-spaced sequence of K candidate lasso penalties (lam values) for tuning space(), analogous to the lambda_max-based grids used in lasso path algorithms. The largest value, lambda_max, is the largest off-diagonal entry of a variance-rescaled Gram matrix — the smallest penalty above which every off-diagonal partial correlation coefficient is driven to zero; the sequence descends geometrically to lambda_max * eps.

Usage

lambda.bound(dt, eps = 1e-06, K = 30)

Arguments

dt

list of n matrices, each p x q, in the same format expected by the data argument of space().

eps

ratio of the smallest to the largest penalty in the returned sequence, i.e. lambda_min = lambda_max * eps.

K

number of penalty values to generate.

Value

A numeric vector of length K, decreasing geometrically from lambda_max to lambda_max * eps, suitable to pass one at a time as the lam argument of space() (e.g. selecting among the fits with a BIC-type criterion).

Examples

set.seed(1)
p <- 5; q <- 4; n <- 3
data <- replicate(n, matrix(rnorm(p * q), p, q), simplify = FALSE)
lambda.bound(data, K = 10)

matSPACE documentation built on Sept. 12, 2026, 5:10 p.m.