Learn R Programming

tsna (version 0.1.3)

formation_and_dissolution: Counts or fractions of edge transitions in a networkDynamic object

Description

The functions tEdgeFormation and tEdgeDissolution evaluate a network object at multiple time points and return counts (or fractions) of the number of edges forming (edge onset at time point) and dissolving (edge terminus at time point). The counts are returned as numeric vector which is a time-series object (class ts).

Usage

tEdgeFormation(nd, start, end, time.interval = 1, 
               result.type=c('count','fraction'), include.censored=FALSE)

tEdgeDissolution(nd, start, end, time.interval = 1, result.type=c('count','fraction'), include.censored=FALSE)

Arguments

nd
start
optional numeric time value at which evaluation should start (default is first observed time)
end
optional numeric time value at which evaluation should end (default is last observed time)
time.interval
optional numeric value giving time interval between evaluations (default is 1)
result.type
either 'count' indicating that results should be returned as counts of tie changes or 'fraction' meaning that results should be returned as fraction of ties dissolving (for dissolution) or fraction of empty dyads forming ties (fo
include.censored
logical, should ties with truncated/censored onset or termination times be included in the respective formation or dissolution counts?

Value

  • For tEdgeFormation and tEdgeDissolution, a numeric vector of class ts giving the formation and dissolution counts (respectively) as a time-series. For edgeFormationAt and edgeDissolutionsAt, a single numeric value

Details

Uses as.data.frame.networkDynamic internally. TODO: dyad formation rate is not yet corrected for vertex activity, uses the aggregate, not the momentary, network size.

When result.type='fraction':

  • formation returns the ratio of number of ties forming to the number of possible empty dyads that could have formed ties. So value of 1 would mean all empty dyads formed ties, value of 0 means no ties formed. In sparse networks, the numbers will tend to be very, very small.
  • dissolution returns the ratio of the number of ties dissolving to the number preexisting ties that could have dissolved. So value of 1 means all ties disolved, 0 means no ties disolved.

When include.censored=FALSE spells of edges which onset outside of the query range will not be included in formation counts.

Examples

Run this code
library(networkDynamicData)
  data(concurrencyComparisonNets)
  # plot formation and dissolution counts time-series
  plot(tEdgeFormation(base),col='green', 
    main='edge formation and dissolution rates per timestep of base')
  points(tEdgeDissolution(base),col='red',type='l')
  # compute fraction of ties dissolving every 10 steps
  tEdgeDissolution(base,time.interval = 10,result.type = 'fraction')
  # compute fraction of empty dyads forming ties every 10 steps
  tEdgeFormation(base,time.interval = 10,result.type = 'fraction')

Run the code above in your browser using DataLab