ggm {Libra} | R 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
|
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(\mu, \Theta^{-1})
where \Theta
is sparse p-by-p symmetric matrix. Then conditional on x_{-j}
x_j \sim N(\mu_j - \sum_{k\neq j}\Theta_{jk}/\Theta_{jj}(x_k-\mu_k),1/\Theta_{jj})
then the composite conditional likelihood is like this:
- \sum_{j} condloglik(X_j | X_{-j})
or in detail:
\sum_{j} \Theta_{j}^TS\Theta_{j}/2\Theta_{jj} - ln(\Theta_{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]