ggm | R Documentation |
Solver for the entire solution path of coefficients.
ggm( X, kappa, alpha, S = NA, c = 2, tlist, nt = 100, trate = 100, print = FALSE )
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. |
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.
A "ggm" class object is returned. The list contains the call, the path, value for alpha, kappa, t.
Jiechao Xiong
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]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.