toa_diff {netdiffuseR} | R Documentation |
Difference in Time of Adoption (TOA) between individuals
Description
Creates n \times n
matrix indicating the difference in times of adoption between
each pair of nodes
Usage
toa_diff(obj, t0 = NULL, labels = NULL)
Arguments
obj |
Either an integer vector of size |
t0 |
Integer scalar. Sets the lower bound of the time window (e.g. 1955). |
labels |
Character vector of size |
Details
Each cell ij of the resulting matrix is calculated as toa_j - toa_i
, so that whenever its positive it means that the j-th individual (alter)
adopted the innovation sooner.
Value
An n \times n
symmetric matrix indicating the difference in times of
adoption between each pair of nodes.
Author(s)
George G. Vega Yon & Thomas W. Valente
Examples
# Generating a random vector of time
set.seed(123)
times <- sample(2000:2005, 10, TRUE)
# Computing the TOA differences
toa_diff(times)
[Package netdiffuseR version 1.22.6 Index]