glassonet2: The glassonet2() function

Description Usage Arguments Value Examples

View source: R/glassonet2.R

Description

The glassonet2 function is designed to learn the graph structure, the corresponding precision matrix and covariance matrix by using the graph lasso method.

Usage

1
glassonet2(Y0, nlambda = nlambda, lambda.min.ratio = 0.001, method)

Arguments

Y0

The data matrix for the GGM model.

nlambda

The number of interval used in the penalized path in lasso and elastics. It results in the number of lambda values to be used in the penalization. The default value is nlambda assigned in the parent function sparsenetgls().

lambda.min.ratio

It is the default parameter set in function huge() in the package 'huge'. Quoted from huge(), it is the minimal value of lambda, being a fraction of the upper bound (MAX) of the regularization/ thresholding parameter that makes all the estimates equal to 0. The default value is 0.001.

method

There are two options for the method parameter which is provided in the huge() function. One is 'glasso' and the other one is 'mb'.

Value

Return the precision matrix 'OMEGAMATRIX', penalized path parameter lambda 'lambda' and covariance matrix 'COVMATRIX'.

Examples

1
2
3
4
5
n=20
VARknown <- rWishart(1, df=4, Sigma=matrix(c(1,0,0,0,1,0,0,0,1),
nrow=3,ncol=3))
Y0 <- mvrnorm(n=n,mu=rep(0.5,3),Sigma=VARknown[,,1])
fitglasso <- glassonet2(Y0=Y0,nlambda=5,method='glasso')

sparsenetgls documentation built on Nov. 8, 2020, 7:37 p.m.