graphVAR1: Graphs of the temporal (or contemporaneous) relations implied...

Description Usage Arguments Author(s) References See Also Examples

View source: R/graphVAR1.r

Description

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

Usage

1
2
3
4
5
6
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 autoregression parameters, which is assumed to be sparse.

sparseP

Precision matrix \mathbf{Ω}_{\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" or type="contempPC", the global or contemporaneous (respectively) partial correlation graph is plotted.

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.

Author(s)

Wessel N. van Wieringen <w.vanwieringen@vumc.nl>

References

Miok, V., Wilting, S.M., Van Wieringen, W.N. (2017), “Ridge estimation of the VAR(1) model and its time series chain graph from multivariate time-course omics data”, Biometrical Journal, 59(1), 172-191.

See Also

CIGofVAR1, sparsify, sparsifyVAR1, plot.igraph.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# 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")

ragt2ridges documentation built on Jan. 28, 2020, 5:08 p.m.