weights_matrix | R Documentation |
Computes the weights matrix with normalised weights (i.e., add up to one) for the network time series with underlying network provided by the user. If the network is unweighted, then each r-stage neighbour is considered equally relevant, i.e., w_{ij}
= \{ \mathcal{N}_r (i)\}^{-1} \mathbb{I} (d(i, j) = r)
, where \mathbb{I}
is the indicator function and the distance is the shortest path in the underlying network.
weights_matrix(network, max_r_stage)
network |
Network linked to the vector time series under study, must be a GNARnet object. |
max_r_stage |
Longest shortest path for which weights are non-zero. If not specified, then its set equal to the upper bound, which is the longest shortest path in the underlying network. |
Weight matrix \mathbf{W}
, each entry is the weight w_{ij}
between a pair of nodes. The matrix is not symmetric, and each row adds up to one when considering r-stage neighbours for a particular r.
Daniel Salnikov and Guy Nason.
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
#
# Weights matrix linked to the mechanical ventilation beds time series.
# This network has a longest shortest path equal to six.
#
#data(fiveNet)
W_norm = weights_matrix(fiveNet, 6)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.