zoomJGL-package {zoomJGL}R Documentation

Zoom-in/out joint graphical lasso

Description

The package was developed to accompany the paper: "Pircalabelu, E., Claeskens, G. and Waldorp, L.J (2019). Zoom-in/out joint graphical lasso for different coarseness scales. Journal of the Royal Statistical Society (C), 69(1), 47-67". It estimates graphical models from data obtained at different coarseness scales. Starting from a predefined scale k* the zoomJGL procedure zooms in or out over scales on particular edges of the graph in order to maintain a similar structure of the graphs across all scales.

Details

Package: zoomJGL
Type: Package
Version: 1.0
Date: 2020-03-20
License: GPL-3

Author(s)

Eugen Pircalabelu <eugen.pircalabelu@uclouvain.be>

References

Pircalabelu, E., Claeskens, G. and Waldorp, L.J (2019). Zoom-in/out joint graphical lasso for different coarseness scales. Journal of the Royal Statistical Society (C), 69(1), 47-67

Examples

library(zoomJGL)
library(qgraph)
data(fmri) 
class(Y)
length(Y)
str(Y[[1]])


# Specify control parameters
list.controls=list(model="AR1",penalize.diagonal=FALSE,kstar=1, rho=1,rho.increments=1,maxiter=1000,tol=1e-4,alpha=0.7)
lambda1=c(.4)
lambda2=c(.2)

# Estimate three undirected (or directed) graphs of different size that share a similar structure by zooming-in (ie.k*=1)
ptm=proc.time()
obj=zoomJGL(Y,lambda1,lambda2,list.controls) 
obj$Convergence
proc.time()-ptm


# Visualize the zoom-in graphs
par(mfrow=c(2,2))
Q=qgraph(obj$Undirected[[1]], directed=F, weighted=T, layout="circle",rescale=F,borders=T, labels=FALSE,vsize=1, label.scale=F, cut=0, plot=T,trans=0.8,vTrans=0.5,esize=3.6,edge.color="#676767")
Q=qgraph(obj$Undirected[[2]], directed=F, weighted=T, layout="circle",rescale=F,borders=T, labels=FALSE,vsize=1, label.scale=F, cut=0, plot=T,trans=0.8,vTrans=0.5,esize=3.6,edge.color="#676767")
Q=qgraph(obj$Undirected[[3]], directed=F, weighted=T, layout="circle",rescale=F,borders=T, labels=FALSE,vsize=1, label.scale=F, cut=0, plot=T,trans=0.8,vTrans=0.5,esize=3.6,edge.color="#676767")


# Estimate three undirected (or directed) graphs of different size that share a similar structure by zooming-out (ie.k*=3)
list.controls=list(model="AR1",penalize.diagonal=FALSE,kstar=3, rho=1,rho.increments=1,maxiter=1000,tol=1e-4,alpha=0.7)

ptm=proc.time()
obj2=zoomJGL(Y,lambda1,lambda2,list.controls) 
obj2$Convergence
proc.time()-ptm


# Visualize the zoom-out graphs
dev.new()
par(mfrow=c(2,2))
Q=qgraph(obj2$Undirected[[1]], directed=F, weighted=T, layout="circle",rescale=F,borders=T, labels=FALSE,vsize=1, label.scale=F, cut=0, plot=T,trans=0.8,vTrans=0.5,esize=3.6,edge.color="#676767")
Q=qgraph(obj2$Undirected[[2]], directed=F, weighted=T, layout="circle",rescale=F,borders=T, labels=FALSE,vsize=1, label.scale=F, cut=0, plot=T,trans=0.8,vTrans=0.5,esize=3.6,edge.color="#676767")
Q=qgraph(obj2$Undirected[[3]], directed=F, weighted=T, layout="circle",rescale=F,borders=T, labels=FALSE,vsize=1, label.scale=F, cut=0, plot=T,trans=0.8,vTrans=0.5,esize=3.6,edge.color="#676767")



[Package zoomJGL version 1.0 Index]