incidence: Counts or fractions of edge transitions in a networkDynamic...

Description Usage Arguments Details Value Note Author(s) Examples

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

1
2
3
4
5
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

a networkDynamic object

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 (for formation). In the later case the number of dyads is corrected for network directedness, loops, and bipartite partition size.

include.censored

logical, should ties with truncated/censored onset or termination times be included in the respective formation or dissolution counts?

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':

When include.censored=FALSE spells of edges which onset outside of the query range will not be included in formation 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

Note

should add additional args to allow binning other than 'at' for working with non-discrete time, options to deal with how censored edges are calculated.

Author(s)

skyebend@uw.edu

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
  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')
  ## Not run: 
  # 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')
  
## End(Not run)
  

tsna documentation built on Nov. 1, 2021, 5:06 p.m.