Kh: Extract Sparse Structured Precision Matrices

View source: R/Kh.R

KhR Documentation

Extract Sparse Structured Precision Matrices

Description

Function Kh computes the sequence of sparse structured precision matrices estimated by sglasso function.

Usage

Kh(object, rho)

Arguments

object

fitted sglasso object;

rho

a subset of the values of the tuning parameter used in sglasso to compute the solution path. By default, the entire sequence of estimated sparse structured precision matrices is returned.

Value

Kh returns a named list containing the sequence of estimated sparse structured precision matrices.

Author(s)

Luigi Augugliaro
Maintainer: Luigi Augugliaro luigi.augugliaro@unipa.it

See Also

sglasso function.

Examples

N <- 100
p <- 5
X <- matrix(rnorm(N * p), N, p)
S <- crossprod(X) / N
mask <- outer(1:p, 1:p, function(i, j) 0.5^abs(i - j))
out.sglasso_path <- sglasso(S, mask, nrho = 5, tol = 1.0e-13)
out.sglasso_path
Kh(out.sglasso_path)
rho <- out.sglasso_path$rho[3]
out.sglasso_single <- sglasso(S, mask, nrho = 1, min_rho = rho, 
   tol = 1.0e-13, algorithm = "ccm")
Kh(out.sglasso_single)

sglasso documentation built on Sept. 22, 2022, 5:06 p.m.