nodeStatsVAR1: VAR(1) model node statistics

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/nodeStatsVAR1.r

Description

Function that calculates for each variate various statistics from a sparse VAR(1) model

Usage

1
nodeStatsVAR1(sparseA, sparseP, as.table = FALSE)

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.

as.table

A logical indicating if the output should be in tabular format.

Details

The function calculates various node statistics from a sparse VAR(1) model. The input matrices \mathbf{A} and \mathbf{Ω}_{\varepsilon} are assumed to be sparse autoregression coefficient and error precision matrices. From these matrices the global and contemporaneous conditional independence graphs are obtained (Dahlhaus, 2000; Dahlhaus, Eichler, 2003).

For both graph types the function calculates various measures of centrality: node degree, betweenness centrality, closeness centrality, and eigenvalue centrality. It also calculates the number of positive and the number of negative edges for each node. For more information on network measures, consult, e.g., Newman (2010).

In addition, for each variate the mutual information (with all other variates) (Miok et al., 2017), mean impulse response (Hamilton, 1994; Lutkepohl 2005), the (error) variance, and the partial error variance are presented.

Value

An object of class list (when as.table = FALSE) with slots:

degreeAin

A numeric vector with the number of (temporal) edges pointing to each node ('in'-degree).

degreeAout

A numeric vector with the number of (temporal) edges leaving each node ('out'-degree).

nNegAin

A numeric vector with the number of negative (temporal) edges pointing to each node.

nPosAin

A numeric vector with the number of positive (temporal) edges pointing to each node ('in'-degree)

nNegAout

A numeric vector with the number of negative (temporal) edges leaving each node ('out'-degree)

nPosAout

A numeric vector with the number of positive (temporal) edges leaving each node ('out'-degree)

degreePe

A numeric vector with the number of contemporaneous edges of each node (as implied by the error precision matrix)

betweennessPe

A numeric vector representing the contemporaneous betweenness centrality for each node.

closenessPe

A numeric vector representing the contemporaneous closeness centrality for each node.

eigenCentralityPe

A numeric vector representing the contemporaneous eigen centrality for each node.

nNegPe

A numeric vector representing the number of negative contemporaneous edges for each node.

nPosPe

A numeric vector representing the number of positive contemporaneous edges for each node.

variancePe

A numeric vector representing the error variance of each node.

partialVarPe

A numeric vector representing the partial error variance of each node.

varianceY

A numeric vector representing the variance of each node.

degreePy

A numeric number of edges of each node in the global Markov graph.

betweennessPy

A numeric vector representing the betweenness centrality for each node in the global Markov graph.

closenessPy

A numeric vector representing the closeness centrality for each node in the global Markov graph.

eigenCentralityPy

A numeric vector representing the eigen centrality for each node in the global Markov graph.

mutualInfo_Tplus1

A numeric vector with for each node its mutual information with all other nodes at the next (t+1) time point.

mutualInfo_Tplus2

A numeric vector with for each node its mutual information with all other nodes at the (t+2)-th time point.

itemResponse_Tplus1

A numeric vector with for each node its mean absolute impulse response on all other nodes at the next (t+1) time point.

itemResponse_Tplus2

A numeric vector with for each node its mean absolute impulse response on all other nodes at the (t+2)-th time point.

When as.table = TRUE the list items above are represented in tabular form as an object of class matrix.

Future versions of this function may include additional statistics

Author(s)

Wessel N. van Wieringen <w.vanwieringen@vumc.nl>, Carel F.W. Peeters.

References

Dahlhaus (2000), “Graphical interaction models for multivariate time series”, Metrika, 51, 157-172.

Dahlhaus, Eichler (2003), “Causality and graphical models in time series analysis”, Oxford Statistical Science Series, 115-137.

Hamilton, J. D. (1994), Time Series Analysis. Princeton: Princeton university press.

Lutkepohl, H. (2005), New Introduction to Multiple Time Series Analysis. Springer, Berlin.

Newman, M.E.J. (2010). Networks: An Introduction, Oxford University Press.

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

ridgeVAR1, sparsifyVAR1, graphVAR1

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# specify VAR(1) model parameters
A <- matrix(c(-0.1, -0.3,    0, 
               0.5,    0,    0, 
                 0,    0, -0.4), byrow=TRUE, ncol=3)
P <- matrix(c(   1,  0.5,    0, 
               0.5,    1,    0, 
                 0,    0,    1), byrow=TRUE, ncol=3)

# adjacency matrix of (global) conditional independencies.
# nodeStatsVAR1(A, P)

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