get_discordant_edgelist {EpiModel} | R Documentation |
Get Discordant Edgelist Based on Specified Status Variable
Description
This function returns a data.frame
with a discordant
edgelist, defined as the set of edges for which the status attribute
of interest is discordant between the two partners.
Usage
get_discordant_edgelist(
dat,
status.attr,
head.status,
tail.status,
networks = NULL
)
Arguments
dat |
Main |
status.attr |
The name of the status attribute of interest. |
head.status |
The value(s) of |
tail.status |
The value(s) of |
networks |
Numerical indexes of the networks to extract the partnerships
from. (May be > 1 for models with multiple overlapping
networks.) If |
Details
This is a generalized version of the discord_edgelist
function.
It creates an edgelist of current partnerships in which the status attribute
of interest (as specified by the parameter status.attr
) of one partner matches
the value (or one of the values) of the head.status
parameter while the
corresponding status attribute of the other partner matches the value (or
one of the values) of the tail.status
parameter.
Value
A data.frame
with the following columns:
-
head
: Positional ID of the head node. -
tail
: Positional ID of the tail node. -
head_status
: Status of the head node. -
tail_status
: Status of the tail node. -
network
: The numerical index of the network on which the partnership is located.