CalculateInfectionChain: Calculates infection chain.

View source: R/calculate_infection_chain.R

CalculateInfectionChainR Documentation

Calculates infection chain.

Description

Parallel function to calculate outgoing and ingoing infection chain.

Usage

CalculateInfectionChain(
  Data,
  from,
  to,
  Time,
  selected.nodes,
  type = "outgoing",
  number.of.cores = NULL
)

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.

selected.nodes

vector, the infection chain will be calculated for the nodes in the selected.node vector.

type

character, it determines which infection chain type will be calculated (default is 'outgoing'). Options are: 'outgoing', 'ingoing' or 'both'.

number.of.cores

integer, number of cores used to calculate the infection chain (default is 2).

Details

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

Value

data.frame. The first (or first and second) column, *$infection.chain, is the infection chain value. The last column, *$selected.nodes, are the selected nodes.

References

[1] K Buttner, J Krieter, and I Traulsen. "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." In: Transboundary and emerging diseases 2000 (May 2013), pp. 1-12. [2] C Dube, C Ribble, D Kelton, et al. "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." In: Transboundary and emerging diseases 55.9-10 (Dec. 2008), pp. 382-392. [3] C Dube, C Ribble, D Kelton, et al. "A review of network analysis terminology and its application to foot-and-mouth disease modelling and policy development." In: Transboundary and emerging diseases 56.3 (Apr. 2009), pp. 73-85. [4] Jenny Frossling, Anna Ohlson, Camilla Bjorkman, et al. "Application of network analysis parameters in risk-based surveillance - Examples based on cattle trade data and bovine infections in Sweden." In: Preventive veterinary medicine 105.3 (July 2012), pp. 202-208. doi: 10.1016/j.prevetmed.2011.12.011. [5] Maria Noremark, Nina Ha kansson, Susanna Sternberg Lewerin, et al. "Network analysis of cattle and pig movements in Sweden: measures relevant for disease control and risk based surveillance." In: Preventive veterinary medicine 99.2-4 (2011), pp. 78-90. doi: 10.1016/j.prevetmed.2010.12.009.

Examples

# Loading data from....

# call infection chain function
outgoing.infection.chain <- CalculateInfectionChain(Data, from, to, Time,
                                                   selected.nodes,
                                                   type = 'outgoing')
                                                   
ingoing.infection.chain <- CalculateInfectionChain(Data, from, to, Time,
                                                   selected.nodes,
                                                   type = 'outgoing')

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