measure_net_diffusion {manynet} | R Documentation |
Measures of network diffusion
Description
These functions allow measurement of various features of a diffusion process at the network level:
-
net_transmissibility()
measures the average transmissibility observed in a diffusion simulation, or the number of new infections over the number of susceptible nodes. -
net_recovery()
measures the average number of time steps nodes remain infected once they become infected. -
net_reproduction()
measures the observed reproductive number in a diffusion simulation as the network's transmissibility over the network's average infection length. -
net_immunity()
measures the proportion of nodes that would need to be protected through vaccination, isolation, or recovery for herd immunity to be reached. -
net_hazard()
measures the hazard rate or instantaneous probability that nodes will adopt/become infected at that time
Usage
net_transmissibility(diff_model)
net_recovery(diff_model, censor = TRUE)
net_reproduction(diff_model)
net_immunity(diff_model, normalized = TRUE)
net_hazard(diff_model)
Arguments
diff_model |
A valid network diffusion model,
as created by |
censor |
Where some nodes have not yet recovered by the end of the simulation, right censored values can be replaced by the number of steps. By default TRUE. Note that this will likely still underestimate recovery. |
normalized |
Logical scalar, whether the centrality scores are normalized. Different denominators are used depending on whether the object is one-mode or two-mode, the type of centrality, and other arguments. |
Transmissibility
net_transmissibility()
measures how many directly susceptible nodes
each infected node will infect in each time period, on average.
That is:
T = \frac{1}{n}\sum_{j=1}^n \frac{i_{j}}{s_{j}}
where i
is the number of new infections in each time period, j \in n
,
and s
is the number of nodes that could have been infected in that time period
(note that s \neq S
, or
the number of nodes that are susceptible in the population).
T
can be interpreted as the proportion of susceptible nodes that are
infected at each time period.
Recovery time
net_recovery()
measures the average number of time steps that
nodes in a network remain infected.
Note that in a diffusion model without recovery, average infection length
will be infinite.
This will also be the case where there is right censoring.
The longer nodes remain infected, the longer they can infect others.
Reproduction number
net_reproduction()
measures a given diffusion's reproductive number.
Here it is calculated as:
R = \min\left(\frac{T}{1/L}, \bar{k}\right)
where T
is the observed transmissibility in a diffusion
and L
is the observed recovery length in a diffusion.
Since L
can be infinite where there is no recovery
or there is right censoring,
and since network structure places an upper limit on how many
nodes each node may further infect (their degree),
this function returns the minimum of R_0
and the network's average degree.
Interpretation of the reproduction number is oriented around R = 1.
Where R > 1
, the 'disease' will 'infect' more and more
nodes in the network.
Where R < 1
, the 'disease' will not sustain itself and eventually
die out.
Where R = 1
, the 'disease' will continue as endemic,
if conditions allow.
Herd immunity
net_immunity()
estimates the proportion of a network
that need to be protected from infection for herd immunity
to be achieved.
This is known as the Herd Immunity Threshold or HIT:
1 - \frac{1}{R}
where R
is the reproduction number from net_reproduction()
.
The HIT indicates the threshold at which
the reduction of susceptible members of the network means
that infections will no longer keep increasing.
Note that there may still be more infections after this threshold has been reached,
but there should be fewer and fewer.
These excess infections are called the overshoot.
This function does not take into account the structure
of the network, instead using the average degree.
Interpretation is quite straightforward. A HIT or immunity score of 0.75 would mean that 75% of the nodes in the network would need to be vaccinated or otherwise protected to achieve herd immunity. To identify how many nodes this would be, multiply this proportion with the number of nodes in the network.
Hazard rate
The hazard rate is the instantaneous probability of adoption/infection at each time point (Allison 1984). In survival analysis, hazard rate is formally defined as:
%
\lambda(t)=\lim_{h\to +0}\frac{F(t+h)-F(t)}{h}\frac{1}{1-F(t)} %
By approximating h=1
, we can rewrite the equation as
%
\lambda(t)=\frac{F(t+1)-F(t)}{1-F(t)} %
If we estimate F(t)
,
the probability of not having adopted the innovation in time t
,
from the proportion of adopters in that time,
such that F(t) \sim q_t/n
, we now have (ultimately for t>1
):
%
\lambda(t)=\frac{q_{t+1}/n-q_t/n}{1-q_t/n} = \frac{q_{t+1} - q_t}{n - q_t} = \frac{q_t - q_{t-1}}{n - q_{t-1}} %
where q_i
is the number of adopters in time t
,
and n
is the number of vertices in the graph.
The shape of the hazard rate indicates the pattern of new adopters over time. Rapid diffusion with convex cumulative adoption curves will have hazard functions that peak early and decay over time. Slow concave cumulative adoption curves will have hazard functions that are low early and rise over time. Smooth hazard curves indicate constant adoption whereas those that oscillate indicate variability in adoption behavior over time.
Source
{netdiffuseR}
References
Kermack, W. and McKendrick, A., 1927. "A contribution to the mathematical theory of epidemics". Proc. R. Soc. London A 115: 700-721.
Allison, P. 1984. Event history analysis regression for longitudinal event data. London: Sage Publications.
Wooldridge, J. M. 2010. Econometric Analysis of Cross Section and Panel Data (2nd ed.). Cambridge: MIT Press.
See Also
Other measures:
between_centrality
,
close_centrality
,
degree_centrality
,
eigenv_centrality
,
measure_attributes
,
measure_closure
,
measure_cohesion
,
measure_features
,
measure_heterogeneity
,
measure_hierarchy
,
measure_holes
,
measure_infection
,
measure_node_diffusion
,
measure_periods
,
measure_properties
,
member_diffusion
Other diffusion:
measure_infection
,
measure_node_diffusion
,
member_diffusion
,
play
Examples
smeg <- generate_smallworld(15, 0.025)
smeg_diff <- play_diffusion(smeg, recovery = 0.2)
plot(smeg_diff)
# To calculate the average transmissibility for a given diffusion model
net_transmissibility(smeg_diff)
# To calculate the average infection length for a given diffusion model
net_recovery(smeg_diff)
# To calculate the reproduction number for a given diffusion model
net_reproduction(smeg_diff)
# Calculating the proportion required to achieve herd immunity
net_immunity(smeg_diff)
# To find the number of nodes to be vaccinated
ceiling(net_immunity(smeg_diff) * manynet::net_nodes(smeg))
# To calculate the hazard rates at each time point
net_hazard(play_diffusion(smeg, transmissibility = 0.3))