Package: tsn 1.4.1

Mohammed Saqr

tsn: Time-Series Network Construction

Constructs distance, visibility, and state-transition networks from univariate time series. The core constructor provides whole-series and sliding-window distance networks, natural and horizontal visibility graphs following Lacasa et al. (2008) <doi:10.1073/pnas.0709247105> and Luque et al. (2009) <doi:10.1103/PhysRevE.80.046103>, and optional state aggregation. Companion verbs expose discretization, trend classification, and an optional bridge to the 'Nestimate' transition-network models. Core network construction uses only packages distributed with R.

Authors:Mohammed Saqr [aut, cre, cph], Sonsoles López-Pernas [aut, cph], Manuel J. Gomez [aut]

tsn_1.4.1.tar.gz
tsn_1.4.1.zip(r-4.7-any)tsn_1.4.1.zip(r-4.6-any)tsn_1.4.1.zip(r-4.5-any)
tsn_1.4.1.tgz(r-4.6-any)tsn_1.4.1.tgz(r-4.5-any)
tsn_1.4.1.tar.gz(r-4.7-any)tsn_1.4.1.tar.gz(r-4.6-any)
tsn_1.4.1.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
tsn/json (API)

# Install 'tsn' in R:
install.packages('tsn', repos = c('https://mohsaqr.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/mohsaqr/tsn/issues

Pkgdown/docs site:https://pak.dynasite.org

Datasets:
  • esm_srl - Momentary Self-Regulated Learning Experience-Sampling Data
  • srl - Daily Self-Regulated Learning Panel

On CRAN:

Conda:

4.30 score 3 scripts 9 exports 0 dependencies

Last updated from:7e3b1f2966. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develOK150
source / vignettesOK183
linux-releaseOK135
macos-releaseOK231
macos-oldrelOK226
windows-develOK159
windows-releaseOK89
windows-oldrelOK113
wasm-releaseOK84

Exports:discretizeseries_networkstrendts_atnats_cnats_ftnats_tnatsnvg

Dependencies:

Constructing Time Series Networks
Introduction | Data | Transition Network Analysis | Transition probabilities with ts_tna() | Transition frequencies with ts_ftna() | State co-occurrence with ts_cna() | Attention-weighted transitions with ts_atna() | Indexing the model with series_networks() | Local direction with trend() | Visibility with vg() | Window similarity with tsn()

Last update: 2026-09-03
Started: 2026-08-25

Plotting Time Series Networks
Introduction | Data | Discrete-state plots | Overlay | Ribbon | Heatmap | Stack | Local-direction plots | Points | Panels | Constructed-network plots | Network | Source series | Weighted distance network | Adjusting the network encoding | Transition Network Analysis plots | Combined | Extracted-model plots | Selecting a plot

Last update: 2026-09-03
Started: 2026-08-19

Transition Networks from Time Series: Estimation and Inference with Nestimate
Introduction | From measurements to a model | The bridge: this object is a Nestimate model | Four constructors, one interface | One series, and what it can support | Choosing states that mean something | One network per person | Describing the model | Centrality | How much of the sequence is structure, and how much is noise | Pruning | Bootstrap: which edges survive resampling? | Stability: would the same states rank first in a smaller study? | Markov order: is a first-order model enough? | Comparing two periods | More than two groups: one model per condition | Plotting a model | Where the line falls

Last update: 2026-09-03
Started: 2026-08-21

Grouped Transition Models: One Network per Condition
The question | One call, one network per condition | Why not subset the data and build each model by hand? | First failure: the subset welds broken time back together | Second failure: each subset learns its own thresholds | The collection is data | Composition and dynamics | Composition | Mean first passage times | Entropy and centrality | Drawing the networks | Are the differences real? | The permutation test | The metric panel | Bootstrap and Bayesian certainty per group | Is first order enough, per group? | Stability under case dropping | Pruning the collection | What to watch for | When to use which | References

Last update: 2026-08-25
Started: 2026-08-25

The Nestimate Compatibility Map
One object, two packages | Reading the model as data | Where the process spends its time | Which states and edges carry the structure? | How the process moves | Mean first passage times | Persistence, return, and sojourn | Is the chain well-behaved? | How predictable is the process? | Does history beyond one step matter? | Simplifying the model | How sure are we about the estimates? | Sequence bootstrap | Bayesian edge certainty | Whole-network statistics: the vertex bootstrap | Case dropping, in two flavours | Split-half reliability | Comparing two models | The difference itself | Four more verdicts on the same pair | Link prediction | Grouped models | What does not apply, and why | The compatibility map | References

Last update: 2026-08-25
Started: 2026-08-25