Learn R Programming

EpiContactTrace (version 0.9.1)

OutgoingContactChain: OutgoingContactChain

Description

The outgoing contact chain is the number of holdings in the network of direct and indirect contacts from the root holding, with regard to temporal and order of the contacts during the defined time window used for contact tracing.

Usage

OutgoingContactChain(x, ...)
"OutgoingContactChain"(x)
"OutgoingContactChain"(x)
"OutgoingContactChain"(x, root, tEnd = NULL, days = NULL, outBegin = NULL, outEnd = NULL)

Arguments

x
a ContactTrace object, or a list of ContactTrace objects or a data.frame with movements of animals between holdings, see Trace for details.
...
Additional arguments to the method
root
vector of roots to calculate outgoing contact chain for.
tEnd
the last date to include outgoing movements. Defaults to NULL
days
the number of previous days before tEnd to include outgoing movements. Defaults to NULL
outBegin
the first date to include outgoing movements. Defaults to NULL
outEnd
the last date to include outgoing movements. Defaults to NULL

Value

A data.frame with the following columns:
root
The root of the contact tracing
outBegin
The first date to include outgoing movements
outEnd
The last date to include outgoing movements
outDays
The number of days in the interval outBegin to outEnd
outDegree
The OutgoingContactChain of the root within the time-interval

Methods

signature(x = "ContactTrace")
Get the OutgoingContactChain of a ContactTrace object.
signature(x = "data.frame")
Get the OutgoingContactChain for a data.frame with movements, see examples.

References

  • Dube, C., et al., A review of network analysis terminology and its application to foot-and-mouth disease modelling and policy development. Transbound Emerg Dis 56 (2009) 73-85, doi: 10.1111/j.1865-1682.2008.01064.x

  • Noremark, M., et al., Network analysis of cattle and pig movements in Sweden: Measures relevant for disease control and riskbased surveillance. Preventive Veterinary Medicine 99 (2011) 78-90, doi: 10.1016/j.prevetmed.2010.12.009

See Also

NetworkSummary

Examples

Run this code
## Not run: 
# 
# ## Load data
# data(transfers)
# 
# ## Perform contact tracing using tEnd and days
# contactTrace <- Trace(movements=transfers,
#                       root=2645,
#                       tEnd='2005-10-31',
#                       days=91)
# 
# ## Calculate outgoing contact chain from a ContactTrace object
# oc.1 <- OutgoingContactChain(contactTrace)
# 
# ## Calculate outgoing contact chain using tEnd and days
# oc.2 <- OutgoingContactChain(transfers,
#                             root=2645,
#                             tEnd='2005-10-31',
#                             days=91)
# 
# ## Check that the result is identical
# identical(oc.1, oc.2)
# 
# ## Calculate outgoing contact chain for all included herds
# ## First extract all source and destination from the dataset
# root <- sort(unique(c(transfers$source,
#                       transfers$destination)))
# 
# ## Calculate outgoing contact chain
# result <- OutgoingContactChain(transfers,
#                                root=root,
#                                tEnd='2005-10-31',
#                                days=91)
# ## End(Not run)

Run the code above in your browser using DataLab