Learn R Programming

GNAR (version 1.1.4)

local_relevance_plot: Produces a local neighbourhood relevance plot based on the distances in the underlying network.

Description

Produces a local neighbourhood relevance plot based on the distances in the underlying network. The heat-map matrix should reflect clusters if a GNAR model is valid. The size of the clusters depends on the maximum r-stage depth for neighbourhood regression, as \(r^*\) gets larger, the clusters grow or intersect and cover more nodes. The relative strength of conditionally correlated nodes is \( \mathrm{rscc} (i, j) := \{ d(i,j) \}^{-1} \mathbb{I} \{ d(i, j) \leq r^* \} + \{2 d(i,j) \}^{-1} \mathbb{I} \{ r^* < d(i, j) \leq 2 r^* \}\).

Usage

local_relevance_plot(network, r_star)
  cross_correlation_plot(h, vts)

Value

Produces the local relevance plot. Does not return any values.

Arguments

network

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

r_star

Maximum active r-stage depth for neighbourhood regression.

h

The lag in the cross correlation plot.

vts

The vector time series to compute the cross correlation plot on.

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 a local relevance plot, which is a heat-map matrix from a stationary 
# GNAR(1, [1]) simulation.
#
gnar_simulation <- GNARsim(n = 100, net=fiveNet, alphaParams = list(rep(0.35, 5)), 
        betaParams = list(c(0.25)), sigma=1)
# Active node plot
local_relevance_plot(fiveNet, 1)
# Compare to the cross-correlation plot at one-lag
cross_correlation_plot(1, gnar_simulation)

Run the code above in your browser using DataLab