Learn R Programming

GNAR (version 1.1.4)

active_node_plot: Produces an active node matrix heat-map.

Description

Produces an active node matrix heat-map, which compares the local impact each node has on all the other ones (i.e., regressing \(j\) on \(i\)) once a model order has been chosen. The local relevance indes is \(\mathrm{local} (i, j) := \bigg ( w_{ij} \sum_{k = 1}^{p} |\hat{\beta}_{kr}| \bigg ) \bigg \{ \sum_{l \in \mathcal{N} (i)} \sum_{r = 1}^{r^*} \sum_{k = 1}^{p} w_{il} |\hat{\beta}_{kr}| \bigg) \bigg \}^{-1},\) which is closer to one the more relevant \(j\) is when forecasting \(i\).

Usage

active_node_plot(vts, network, max_lag, r_stages)

Value

Produces the local influence matrix heat-map for a specific model order. Does not return any values.

Arguments

vts

Vector time series under study.

network

GNAR network object, which is the underlying network for the time series under study.

max_lag

Maximum lag of the fitted GNAR model - i.e., \(\mathrm{GNAR}(p, [s_1, \dots, s_p]).\)

r_stages

Neighbourhood regression oreder of the fitted GNAR model - i.e., \((s_1, \dots, s_p)\).

Author

Daniel Salnikov and Guy Nason

References

Nason, G.P., Salnikov, D. and Cortina-Borja, M. (2023) New tools for network time series with an application to COVID-19 hospitalisations. https://arxiv.org/abs/2312.00530

Examples

Run this code
#
# Produces an active node heat-map matrix from a stationary GNAR(2, [2, 1]) simulation.
#
gnar_simulation <- GNARsim(n = 100, net=fiveNet,
	alphaParams = list(rep(0.25, 5), rep(0.12, 5)), 
        betaParams = list(c(0.25, 0.13), c(0.20)), sigma=1)
#
# Active node plot
#
active_node_plot(gnar_simulation, fiveNet, 2, c(2, 1))

Run the code above in your browser using DataLab