Learn R Programming

ragt2ridges (version 0.3.4)

graphVARX1: Graphs of the temporal (or contemporaneous) relations implied by the VARX(1) model

Description

Graphs of the (temporal and/or contemporaneous) relations among the variates as implied by the parameters of the VARX(1) model.

Usage

graphVARX1(sparseA, sparseB, sparseP, type="TSCG", side="right", 
           prune=TRUE, nNamesY=NULL, nNamesX=NULL, main=NULL, 
           vertex.color.X="lightcyan2", vertex.color.T0="lightcyan2", 
           vertex.color.T1="lightcyan2", vertex.frame.color="steelblue", 
           vertex.label.cex=-1, vertex.label.color.X="black", 
           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 lag one autoregression parameters, which is assumed to be sparse.

sparseB

A matrix \(\mathbf{B}\) of regression parameters of the time-varying covariates, 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="ABonly" limits this graph to the temporal relations. If 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 bottomleft (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, sparseB and sparseP).

nNamesY

A character containing the variate names to be written inside the nodes.

nNamesX

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.X

Color of covariate nodes.

vertex.color.T0

Color of nodes at time point t. This is ignored when type="contempPC".

vertex.color.T1

Color of nodes at time point t+1. This is ignored when type="contempPC".

vertex.frame.color

Refer to plot.igraph.

vertex.label.cex

Refer to plot.igraph.

vertex.label.color.X

Color of the covariate node label.

vertex.label.color.T0

Color of the node label at time point t. Ignored when type="contempPC".

vertex.label.color.T1

Color of the node label at time point t+1. Ignored when 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. (2019), ``Ridge estimation of network models from time-course omics data'', Biometrical Journal, 61(2), 391-405.

See Also

ridgeVARX1, graphVAR1, graphVAR2, sparsifyVARX1, plot.igraph.

Examples

Run this code
# NOT RUN {
# specify VARX(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)
B <- matrix(c(   0,    0,  0.2,    0,  0.3, -0.7, 
                 0,    0,    0,  0.4,    0,    0, 
                 0, -0.3,    0,    0,    0,    0, 
                 0,    0,  0.5,    0,  0.1,    0, 
                 0,    0,    0,    0,  0.4,    0, 
                 0,    0,    0,  0.4,    0,    0), 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)

# time-series chain graph  of the VARX(1) model
graphVARX1(A, B, P, type="TSCG")
# }

Run the code above in your browser using DataLab