calculateContactChain: Calculates contact chain

calculateContactChainR Documentation

Calculates contact chain

Description

A function to calculate outgoing and ingoing contact chains.

Usage

calculateContactChain(Data, from, to, Time, simultaneous = T)

Arguments

Data

data.frame with network information : node ID, origin node, destiny node, and the time in which the link was established.

from

character, indicates the column used to characterize the origin node of each link.

to

character, indicates the column used to characterize the destiny node of each link.

Time

character, indicates the column used to characterize the time in which the link was established.

simultaneous

logical, whether movements within the same time stamp (same day) are simultaneous (TRUE) with no indirect contacts within each day or continuous (FALSE) and indirect contacts between movements from the same day are possible.

Details

This is a function that calculates the contact chain of a dynamic network.

Value

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.

References

[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

Examples

# 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)
                                                   

leb-fmvz-usp/epinemo documentation built on Nov. 27, 2022, 10:58 p.m.