corbit_plot {GNAR} | R Documentation |
Corbit (correlation-orbit) plot, which aids model selection by visualising network autocorrelation and partial network autocorrelation.
Description
Plots the GNAR network autcorrelation funciton for a choice of maximum lag and maximum r-stage depth in the network. Using the nacf
function for network autocorrelation and pnacf
for partial network autocorrelation.
Usage
corbit_plot(vts, net, max_lag, max_stage, weight_matrix,
viridis_color_option="viridis", size_option="absolute_val",
partial="no", wagner="no")
Arguments
vts |
Vector time series observations for which one wishes to plot the network autocorrelation or partial network autocorrelation. |
net |
GNAR network object linked to the time series under study. |
max_lag |
Maximum lag the Corbit plot produces (i.e., number of time-steps considered for the network autocorrelaiton.) |
max_stage |
Maximum r-stage depth considered for the Corbit plot (i.e., the number of rings in the plot). Corresponds to the length of paths in the underlying network. |
weight_matrix |
A matrix which entries correspond to the weights between nodes. If this term is NULL, then this argument is equal weights between r-stage neighbours. |
viridis_color_option |
Colour scale for the Corbit plot. The default option is |
size_option |
Point size scale for the Corbit plot. The default is the absolute value of the network autocorrelation function (i.e., |
partial |
Option for selecting between computing the network autocorrelation function or the partial network autocorrelation funciton. Default choice is network autocorrelation (i.e., partial="no"), change argument to "yes" for computing the partial network autocorrelation funciton. |
wagner |
Choice for distinguishing between Corbit and Wagner plots, default is set to Corbit (inner function call). For producing Wagner plots one should use |
Details
Function calculates the network autocorrelation or the partial network autocorrelation values for a specific choice of maximum lag and r-stage depth, and produces the corresponing Corbit plot. Each point in the Corbit plot corresponds to the network autocorrelation nacf(h, r)
at a h-lag and r-stage pair. The ring number starting from the inside corresponds to r-stage depth (path length), and the numbers on the outside ring indicate the time lag. The colour scale is based on the overall network autocorrelation values (i.e., the colour is set to highlight strong correlations).
Value
Produces the specified Corbit plot, does not return the network autocorrelaiton values.
Author(s)
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
## Not run:
#
# Simulate 100 observations from a stationary GNAR(2, [2, 1]), where fiveNet is
# the underlying network.
#
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)
# We produce the corresponding Corbit plots.
corbit_plot(gnar_simulation, fiveNet, 20, 3)
corbit_plot(gnar_simulation, fiveNet, 20, 3, partial = "yes")
# If the network object comes with its own weights, then these can be added by including the
# option weigh_matrix in the corbit call.
# corbit_plot(vts, net, max_lag, max_stage, weight_matrix = object_weights_matrix)
## End(Not run)