Learn R Programming

sglasso (version 1.2.6)

gplot.fglasso: Plotting Sparse Factorial Dynamic Gaussian Graphical Model

Description

gplot.fglasso shows the sequence of graphs estimated by fglasso.

Usage

# S3 method for fglasso
gplot(object, rhoid, tp = c(1, 2), sub.tp1, sub.tp2, cex.sub = 1, 
    k = 1.5, layout = layout.circle, ...)

Value

gplot.fglasso returns a list with components:

graph.tp1

an object with class igraph representing the undirected graph estimated at the time point tp[1];

graph.tp2

an object with class igraph representing the undirected graph estimated at the time point tp[2];

graph.net

an object with class igraph representing the directed graph associated to the submatrix \(K_{tp[1],tp[2]}\);

layout

the matrix used to specify the placement of the vertices.

Arguments

object

fitted fglasso object;

rhoid

an integer used to specificy the \(\rho\)-value used to fit the fglasso model;

tp

a vector of length equal to two used to specify the time points of the two graphs that will be compared. By default the first two time points are used;

sub.tp1

sub title for the graph estimated at time point tp[1];

sub.tp2

sub title for the graph estimated at time point tp[2];

cex.sub

a numerical value giving the amount by which plotting sub titles should be magnified relateve to the default;

k

value used to specify the distance between the two graphs;

layout

a function or a matrix used to specify the layout of the graphs that will be plotted. By default the layout.circle function is used;

...

further graphical parameters used to plot the graphs. See package igraph for more details.

Author

Luigi Augugliaro
Maintainer: Luigi Augugliaro luigi.augugliaro@unipa.it

Details

For a given value of the tuning parameter, specified by the argument rhoid, gplot.fglasso shows the graphs estimated at the time points tp[1] and tp[2]. By convention, the graph associated to the sub matrix \(K_{tp[1],tp[2]}\) is represented by a directed graph where a directed edge is drawn by an arrow from a vertex in the first graph pointing forwards a vertex in the second graph.

See Also

fglasso function.

Examples

Run this code
N <- 50
tp <- 3
p <- 3
X <- matrix(rnorm(N * p * tp), N, tp * p)
S <- crossprod(X) / N
model <- list(lag0 = c(s = "c", n = "ut"), lag1 = c(s = "t", n = "t"))
out.fglasso <- fglasso(S = S, model = model, tp = tp, p = p)
gplot(out.fglasso, rhoid = 50, sub.tp1 = "First graph", 
   sub.tp2 = "Second graph")

Run the code above in your browser using DataLab