ggm: Linearized Bregman solver for composite conditionally...

View source: R/ggm.R

ggmR Documentation

Linearized Bregman solver for composite conditionally likelihood of Gaussian Graphical model with lasso penalty.

Description

Solver for the entire solution path of coefficients.

Usage

ggm(
  X,
  kappa,
  alpha,
  S = NA,
  c = 2,
  tlist,
  nt = 100,
  trate = 100,
  print = FALSE
)

Arguments

X

An n-by-p matrix of variables.

kappa

The damping factor of the Linearized Bregman Algorithm that is defined in the reference paper. See details.

alpha

Parameter in Linearized Bregman algorithm which controls the step-length of the discretized solver for the Bregman Inverse Scale Space. See details.

S

The covariance matrix can be provided directly if data matrix X is missing.

c

Normalized step-length. If alpha is missing, alpha is automatically generated by alpha=c*n/(kappa*||X^T*X||_2). Default is 2. It should be in (0,4). If beyond this range the path may be oscillated at large t values.

tlist

Parameters t along the path.

nt

Number of t. Used only if tlist is missing. Default is 100.

trate

tmax/tmin. Used only if tlist is missing. Default is 100.

print

If TRUE, the percentage of finished computation is printed.

Details

The data matrix X is assumed to follow the Gaussian Graohical model which is described as following:

X \sim N(μ, Θ^{-1})


where Θ is sparse p-by-p symmetric matrix. Then conditional on x_{-j}

x_j \sim N(μ_j - ∑_{k\neq j}Θ_{jk}/Θ_{jj}(x_k-μ_k),1/Θ_{jj})


then the composite conditional likelihood is like this:

- ∑_{j} condloglik(X_j | X_{-j})


or in detail:

∑_{j} Θ_{j}^TSΘ_{j}/2Θ_{jj} - ln(Θ_{jj})/2


where S is covariance matrix of data. It is easy to prove that this loss function is convex.

Value

A "ggm" class object is returned. The list contains the call, the path, value for alpha, kappa, t.

Author(s)

Jiechao Xiong

Examples


library(MASS)
p = 20
Omega = diag(1,p,p)
Omega[0:(p-2)*(p+1)+2] = 1/3
Omega[1:(p-1)*(p+1)] = 1/3
S = solve(Omega)
X = mvrnorm(n=500,rep(0,p),S)
obj = ggm(X,10,trate=10)
obj$path[,,50]

Libra documentation built on April 11, 2022, 5:09 p.m.

Related to ggm in Libra...