Learn R Programming

EpiModel (version 0.95)

discord.edgelist: Discordant Edgelist from NetworkDynamic Object

Description

This function returns a data.frame with a discordant edgelist, defined as the set of edges in which the status of the two partners is one susceptible and one infected.

Usage

discord.edgelist(all, infecteds, susceptible, at)

Arguments

all
a list object containing a networkDynamic object and other initialization information passed from epiNet.simTrans.
infecteds
vector of IDs for currently infecteds.
susceptible
vector of IDs for currently susceptible.
at
current time step.

Value

  • This function returns a data.frame with the following columns:
    • time:time step queried
    • inf:ID number for the infected partner
    • sus:ID number for the susceptible partner
    • eid:Edge ID number for that unique dyad
    • infdeg:Current degree for the infected partner
    • susdeg:Current degree for the susceptible partner
    The output from this function is added to the transmission data.frame object that is requested as output in epiNet.simTrans simulations with the save.trans=TRUE argument.

Details

This internal function works within the parent infection function to pull the current edgelist from the dynamic network object, look up the disease status of the head and tails on the edge, and subset the list to those edges with one susceptible and one infected node.

See Also

epiNet.simTrans, infection