calculateContactChain | R Documentation |
A function to calculate outgoing and ingoing contact chains.
calculateContactChain(Data, from, to, Time, simultaneous = T)
Data |
|
from |
|
to |
|
Time |
|
simultaneous |
|
This is a function that calculates the contact chain of a dynamic network.
data.frame
. The first column,
$id
, is the original ID of each node,
$ingoing
, is the ingoing contact chain value, and
$outgoing
, is the outgoing contact chain value.
[1] Buttner K, Krieter J, Traulsen I (2015). "Characterization of Contact Structures for the Spread of Infectious Diseases in a Pork Supply Chain in Northern Germany by Dynamic Network Analysis of Yearly and Monthly Networks." Transboundary and Emerging Diseases, 62, 188-199. doi: 10.1111/tbed.12106
[2] Dube C, Ribble C, Kelton D, et al. (2008). "Comparing Network Analysis Measures to Determine Potential Epidemic Size of Highly Contagious Exotic Diseases in Fragmented Monthly Networks of Dairy Cattle Movements in Ontario, Canada." Transboundary and Emerging Diseases, 55 (9-10), 382-392. doi: 10.1111/j.1865-1682.2008.01053.x
[3] Dube C, Ribble C, Kelton D, et al. (2009). "A Review of Network Analysis Terminology and its Application to Foot-and-Mouth Disease Modelling and Policy Development." Transboundary and Emerging Diseases, 56 (3), 73-85. doi: 10.1111/j.1865-1682.2008.01064.x
[4] Frossling J, Ohlson A, Bjorkman C, et al. (2012). "Application of Network Analysis Parameters in Risk-Based Surveillance - Examples Based on Cattle Trade Data and Bovine Infections in Sweden." Preventive Veterinary Medicine, 105 (3), 202-208. doi: 10.1016/j.prevetmed.2011.12.011
[5] Noremark M, Hakansson N, Lewerin SS, et al. (2011). "Network Analysis of Cattle and Pig Movements in Sweden: Measures Relevant for Disease Control and Risk Based Surveillance." Preventive Veterinary Medicine, 99 (2-4), 78-90. doi: 10.1016/j.prevetmed.2010.12.009
# Creating a data frame with movements from a source node (origin) # to a target node (destination) with identification codes between 1000 and 1050 # in randomly selected dates (day) origin <- sample.int(n = 50, size = 300, replace = TRUE) + 1000 destination <- sample.int(n = 50, size = 300, replace = TRUE) + 1000 day <- sample(seq(as.Date("2019/04/01"), as.Date("2019/06/30"), by = "day"), size = 300, replace = TRUE) database <- data.frame(origin = origin, destination = destination, day = day) # Calling the contact chain function chain <- calculateContactChain(Data = database, from = 'origin', to = 'destination', Time = 'day', simultaneous=T)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.