tiedDuration {tsna} | R Documentation |
Compute the duration of time (or count of events) that each vertex is tied/connected to others by an edge
Description
Computes the total duration that each vertex in the network is tied to other vertices by incident edges. Alternately, if mode="counts"
, computes the total number of incident edge spells each vertex is tied by. The later is especially useful for continuous time networks tied by edges with 0-duration events. For directed networks, the durations can be filtered using the neighborhood
argument to include only incoming, outgoing, or all ties combined in order to return out-tiedor in-tied durations.
Usage
tiedDuration(nd, mode = c("duration", "counts"),
active.default = TRUE,
neighborhood = c("out", "in", "combined"))
Arguments
nd |
a |
mode |
either |
active.default |
logical, should edges with no defined activity spells be considered active by default? |
neighborhood |
value of |
Details
Implemented internally using the as.data.frame.networkDynamic
function and so follows the same truncation conventions for handling censored edges (edges that are active before or after the observation window of the network)
Value
a numeric vector of length equal to the number of vertices in the network with a value equal to the sum of durations (or counts) of active edges incident upon the vertex.
Note
Should the default neighborhood for directed network be 'combined'?
Author(s)
skyebend@uw.edu
Examples
data(moodyContactSim)
tiedDuration(moodyContactSim)
data(McFarland_cls33_10_16_96)
# compute ratio of incoming vs. outgoing speach acts
outDur <- tiedDuration(cls33_10_16_96, mode='counts',neighborhood = 'out')
inDur <- tiedDuration(cls33_10_16_96, mode='counts',neighborhood = 'in')
outDur / inDur