temporal density {tsna}R Documentation

Functions to compute temporal density-related measures on dynamic networks

Description

These functions provide various network-level statistics giving information on the fraction of time edges are active in networkDynamic objects

Usage

tEdgeDensity(nd,mode=c('duration','event'),
              agg.unit=c('edge','dyad'),active.default=TRUE)

Arguments

nd

a networkDynamic object to evaluate density on

mode

option indicating if 'duration' of edge spells should be considered or only the 'event' count (for networks in which events have zero-durations)

agg.unit

option indicating how to calculate the possible observable time to be used as the denominator: 'edge' only counts existing edges 'dyad' counts all possible dyads.

active.default

logical, default TRUE. should edges without explicit timing information be considered active by default?

Details

The tEdgeDensity measure by default (mode='duration', agg.unit='edge') computes the total duration of activity of all the edges in the network and divides by the total amount of observable time for all the dyads between which edges are ever observed. Can be interpreted as the average fraction of observed edges active at any time. A value of 1 corresponds to a network in which all of the observed edges are always active (but the network still may be topologically sparse, having a low density)

The tEdgeDensity function with mode='event' computes the number of events (spells) occurring on each edge the network and divides it by the total amount of observable time per dyad ever observed to have an edge within the time bounds of the network. Can be interpreted as the fraction of existing ties toggling in a unit time step?

The agg.unit='dyad' measure computes the total duration (or count of events) of activity of all the edges in the network, and divides by the total amount of observable time for all the possible dyads (existing and non-existing edges). Value of 1 corresponds to a fully-connected network in which all edges are always active, value of 0 would be a network with no active edges. Can be interpreted as the average fraction of possible edges active at any time.

For networks with instantaneous spells, the event measures would be used in preference to the duration measures, as all of the events will have zero durations.

Note that all of these measures depend on having an accurate value for the temporal bounds of the network. If a net.obs.period exists, it will determine the range of observations. If it does not exist, the range will be the (non-Inf) range of earliest and latest events found on the network by get.change.times. If no non-Inf range exists (presumably because all ties are always active or always inactive), the range (0-1) will be used.

For sensible results on discrete networks, the measures are effectively making the assumption that the time increment is 1. TODO: read time increment from net.obs.period if it exits?

Networks with no edges or vertices will return 0, although they are technically undefined.

Behavior with multiplex ties? dyad measures could range above 1, edge measures will re-normalize.

Value

A numeric value representing the network-level measure of the density metric applied

Note

These are experimental functions, names and arguments still subject to change. Should these be collapsed to a single measure with multiple arguments?

Author(s)

skyebend

References

none yet

Examples

## Not run: 
require(networkDynamicData)
data(hospital_contact)
tEdgeDensity(hospital)

## End(Not run)

[Package tsna version 0.3.5 Index]