Learn R Programming

ragt2ridges (version 0.1.9)

graphVAR1: Graphs of the temporal (or contemporaneous) relations implied by the VAR(1) model

Description

Graphs of the (conditional independence, temporal, or contemporaneous) relations among the variates as implied by the parameters of the VAR(1).

Usage

graphVAR1(sparseA, sparseP, type="TSCG", side="left", prune=TRUE, 
nNames=NULL, main=NULL, vertex.color.T0="lightcyan2", 
vertex.color.T1="lightcyan2", vertex.frame.color="steelblue", 
vertex.label.cex=-1, vertex.label.color.T0="black", 
vertex.label.color.T1="black", vertex.label.font=1.5, 
vertex.size=-1, edge.arrow.size=-1, edge.width=-1, ...)

Arguments

sparseA
A matrix $\mathbf{A}$ of regression parameters, which is assumed to be sparse.
sparseP
Precision matrix $\mathbf{\Omega}_{\varepsilon}$ the error, which is assumed to be sparse.
type
A character indicating what should be plotted. If type="TSCG". the time series chain graph is plotted, while if type="Aonly" limits this graph to the temporal relations. If type="globalPC" o
side
A character indicating whether the contemporaneous dependencies should be plotted on the left-hand (time t) or the right-hand (time t+1) side. Only active when type="TSCG".
prune
A logical indicating whether to remove covariates without any temporal (or contemporaneous) relations (as implied by sparseA and sparseP).
nNames
A character containing the covariate names to be written inside the nodes.
main
The character to be plotted as title above the graph.
vertex.color.T0
Color of nodes at time point t.
vertex.color.T1
Color of nodes at time point t+1. This is ignored when type="globalPC" or type="contempPC".
vertex.frame.color
Refer to plot.igraph.
vertex.label.cex
Refer to plot.igraph.
vertex.label.color.T0
Color of the node label at time point t.
vertex.label.color.T1
Color of the node label at time point t+1. Ignored when type="globalPC" or type="contempPC".
vertex.label.font
Refer to plot.igraph.
vertex.size
Refer to plot.igraph.
edge.arrow.size
Refer to plot.igraph.
edge.width
Refer to plot.igraph.
...
Other arguments to be passed on to plot.igraph.

References

Miok, V., Wilting, S.M., Van Wieringen, W.N. (2015), "Ridge estimation of the VAR(1) model and its time series chain graph from multivariate time-course omics data", submitted.

See Also

CIGofVAR1, sparsify, sparsifyVAR1, plot.igraph.

Examples

Run this code
# specify VAR(1) model parameters
A <- matrix(c(-0.1, -0.3, 0, 0.5, 0, 0, 0, 0, -0.4, -0.1, -0.3, 
     0, 0.5, 0, 0, 0, 0, -0.4, -0.1, -0.3, 0, 0.5, 0, 0, 0, 0, 
     -0.4, -0.1, -0.3, 0, 0.5, 0, 0, 0, 0, -0.4), byrow=TRUE, ncol=6)
P <- matrix(c(2, 0, -0.5, 0.5, 0, 0.5, 0, 1, 0.5, 0.5, 0.5, 0, -0.5, 
     0.5, 1, 0, 0, 0.5, 0.5, 0.5, 0, 1, 0, 0, 0, 0.5, 0, 0, 1, 0, 
     0.5, 0, 0.5, 0, 0, 1), byrow=TRUE, ncol=6)

# adjacency matrix of (global) conditional independencies.
graphVAR1(A, P, type="TSCG")

Run the code above in your browser using DataLab