burstiness: Burstiness and memory of each vertex's activity

View source: R/events.R

burstinessR Documentation

Burstiness and memory of each vertex's activity

Description

Whether a vertex acts in bursts or at a steady pace. Burstiness compares the spread of the gaps between a vertex's events with their average: it approaches 1 for increasingly heterogeneous sequences, has theoretical reference value 0 for a Poisson process, and is -1 for a metronome. The memory coefficient asks a different question – whether a short gap tends to be followed by another short gap.

Two vertices can post the same number of times and differ entirely on both.

Usage

burstiness(
  dn,
  measure = c("burstiness", "memory", "events"),
  sessions = c("bounded", "collapse", "separate"),
  plot = FALSE
)

Arguments

dn

A temporal network from dynet().

measure

One or more of "burstiness", "memory", "events" and "mean_gap". Defaults to the first three. Anything else raises a dynet_unknown_measure error.

sessions

How to treat sessions: "bounded" (the default), "collapse" or "separate", as in centrality_series().

plot

Whether to draw the result as well as return it. Drawing is a side effect in the manner of graphics::hist(): the verb still returns its tidy table, invisibly when it has drawn, so plot = TRUE saves the wrapping plot() call without changing what comes back. Use plot() on the result when the figure needs arguments of its own.

Details

One raw spell row contributes its start time once to each distinct incident vertex. A self-loop is one event, equal-time rows remain distinct events, direction does not alter incidence, and interval ends and weights are ignored. Sorted equal times therefore create legitimate zero gaps. Explicitly onset-censored limits are not observed onset events and are excluded; terminus censoring does not affect this onset sequence.

If the usable interevent gaps are \tau_1,\ldots,\tau_k, burstiness is

B=(\sigma-\mu)/(\sigma+\mu),

where \mu is their mean and \sigma=\sqrt{k^{-1}\sum_i(\tau_i-\mu)^2} is the population standard deviation of the equal-mass empirical gap distribution. mean_gap needs at least one gap. Burstiness needs at least two and is NA if every usable gap is zero. Its finite-sample range is ⁠[-1, 1)⁠.

Memory is the ordinary Pearson correlation between consecutive gaps. It needs at least two adjacent-gap pairs and nonzero variation on both sides; otherwise it is NA. In sessions = "bounded", primitive gaps and adjacent pairs are formed within each session and then pooled, so no cross-session gap is introduced. Collapse includes calendar gaps after erasing labels; separate returns session-local blocks over the fixed vertex universe.

Value

A dynet_metric at node level with no time column: one row per vertex and measure. Attributes record the event identity, dispersion, memory, loop, weight, and session-gap conventions as event_identity = "incident_spell_start", dispersion = "population", memory = "lag1_pearson", loop_contribution = "one_event", weights = "ignored", and mode-specific session_gaps.

References

Goh, K.-I., & Barabasi, A.-L. (2008). Burstiness and memory in complex systems. Europhysics Letters, 81(4), 48002, equations 1 and 4. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1209/0295-5075/81/48002")}

Examples

dn <- dynet(school_contacts)
burstiness(dn)


Dynet documentation built on Oct. 7, 2026, 5:08 p.m.