tna is an R package for the analysis of relational dynamics through Transition Network Analysis (TNA). TNA provides tools for building TNA models, plotting transition networks, calculating centrality measures, and identifying dominant events and patterns. TNA statistical techniques (e.g., bootstrapping and permutation tests) ensure the reliability of observed insights and confirm that identified dynamics are meaningful. See (Saqr et al., 2025) for more details on TNA.

Resources
Tutorials
Six in-depth tutorials cover the main features of tna. Each one is an article on the package website with a PDF and a DOI, and the Resources page gives the reference to cite.
- Transition network analysis with the tna R package: A comprehensive tutorial · PDF · doi:10.5281/zenodo.24581503
- Preparing event data for transition network analysis with the tna R package · PDF · doi:10.5281/zenodo.24581493
- Comparing transition networks with the tna R package: Network, edge, and centrality differences · PDF · doi:10.5281/zenodo.24581499
- Group analysis of transition networks with the tna R package: Permutation tests and bootstrapping · PDF · doi:10.5281/zenodo.24581497
- Discovering subgroups with sequence clustering and transition network analysis in the tna R package · PDF · doi:10.5281/zenodo.24581489
- Transition network analysis of nested data with the tna R package: Resampling, permutation, and mosaic tests that respect the nesting · PDF · doi:10.5281/zenodo.24608489
Book chapters
The book Advanced Learning Analytics Methods has three chapters on TNA, each with an online tutorial:
- Saqr, M., López-Pernas, S., & Tikka, S. Mapping relational dynamics with transition network analysis: A primer and tutorial. https://doi.org/10.1007/978-3-031-95365-1_15 · Online tutorial
- Saqr, M., López-Pernas, S., & Tikka, S. Capturing the breadth and dynamics of the temporal processes with frequency transition network analysis: A primer and tutorial. https://doi.org/10.1007/978-3-031-95365-1_16 · Online tutorial
- López-Pernas, S., Tikka, S., & Saqr, M. Mining patterns and clusters with transition network analysis: A heterogeneity approach. https://doi.org/10.1007/978-3-031-95365-1_17 · Online tutorial
Dynalytics
tna is part of Dynalytics, a framework for the rigorous analytics of dynamical systems. The Dynalytics site gathers the packages, tutorials, papers, and book chapters behind it, and pak.dynasite.org hosts the documentation of every package.
Related R packages
- Nestimate: dynamic, probabilistic, and higher-order network analysis.
- htna: heterogeneous transition network analysis.
- codyna: complex dynamic systems, with sequence patterns, outcomes, and indices (tutorial).
- cograph: analysis and visualization of complex networks.
- transitiontrees: trajectories and dynamics of variable-length pathways and sequences.
- lagdynamics: lag sequential analysis and lag transition networks.
- VaSSTra: from variables to states, sequences, and trajectories.
- Snakeplot: serpentine plots for long timelines and sequential data.
TNA without code
- CarmNote TNA: transition network analysis in a single HTML file that runs in your browser, with no installation and no data leaving your computer (website, documentation, all CarmNotes).
- Shiny app for TNA in the browser.
- JTNA, a point-and-click module for jamovi (source).
Installation
You can install the most recent stable version of tna from CRAN or the development version from GitHub by running one of the following:
install.packages("tna")
# install.packages("devtools")
# devtools::install_github("sonsoleslp/tna")Example
Prepare the data
prepare_data() turns an event log into sequences, here one sequence per student ordered by time.
prepared <- prepare_data(
group_regulation_long,
action = "Action",
actor = "Actor",
time = "Time"
)
plot_sequences(prepared, type = "distribution")Validate the edges
bootstrap() resamples the sequences and keeps the edges that are stable across the resamples.
Centralities and their stability
cent <- centralities(model)
plot(cent, ncol = 3)estimate_cs() drops cases to test whether the centrality ranking holds.
set.seed(265)
stability <- estimate_cs(model)
stability
#> Centrality Stability Coefficients
#>
#> InStrength OutStrength Betweenness
#> 0.9 0.9 0.9
plot(stability)Compare groups
group_model() builds one network per group, here high and low achievers.
groups <- group_model(prepared, group = "Achiever")
plot(groups, minimum = 0.05)permutation_test() tests every edge and centrality difference between the groups.
set.seed(265)
permutation <- permutation_test(
groups,
iter = 1000,
measures = c("InStrength", "OutStrength")
)
plot(permutation, minimum = 0.01)plot_mosaic() shows which states each group uses more than expected. The students work in teams, so actor = "Group" adjusts the test for the nesting; mosaic_test() gives the other tests that allow for it.
plot_mosaic(groups, actor = "Group")The tutorials cover each step in depth, together with sequence clustering, model comparison, and the other model types (frequency, co-occurrence, and attention TNA).
Papers using TNA
- Saqr, M., Lopez-Pernas, S., Tormanen, T., Kaliisa, R., Misiejuk, K., & Tikka, S. (2025). Transition Network Analysis: A Novel Framework for Modeling, Visualizing, and Identifying the Temporal Patterns of Learners and Learning Processes. Proceedings of the 15th International Learning Analytics and Knowledge Conference (LAK ’25), 351–361. ACM. https://doi.org/10.1145/3706468.3706513
- Tikka, S., Lopez-Pernas, S., & Saqr, M. (2025). tna: An R Package for Transition Network Analysis. Applied Psychological Measurement (online ahead of print). doi:10.1177/01466216251348840
- López-Pernas, S., Misiejuk, K., Kaliisa, R., & Saqr, M. (2025). Capturing the process of students’ AI interactions when creating and learning complex network structures. IEEE Transactions on Learning Technologies, 1–13. https://doi.org/10.1109/tlt.2025.3568599
- Törmänen, T., Saqr, M., López-Pernas, S., Mänty, K., Suoraniemi, J., Heikkala, N., & Järvenoja, H. (2025). Emotional dynamics and regulation in collaborative learning. Learning and Instruction, 100, 102188. https://doi.org/10.1016/j.learninstruc.2025.102188
- López-Pernas, S., Misiejuk, K., Oliveira, E., & Saqr, M. (2025). The dynamics of the self-regulation process in student-AI interactions: The case of problem-solving in programming education. Proceedings of the 25th Koli Calling International Conference on Computing Education Research, 1–12. https://doi.org/10.1145/3769994.3770043
- Misiejuk, K., Kaliisa, R., Lopez-Pernas, S., & Saqr, M. (2026). Expanding the Quantitative Ethnography Toolkit with Transition Network Analysis: Exploring Methodological Synergies and Boundaries. In Advances in Quantitative Ethnography. ICQE 2025, CCIS vol. 2677. Springer. https://doi.org/10.1007/978-3-032-12229-2_10
- Lopez-Pernas, S., Misiejuk, K., Tikka, S., & Saqr, M. (2026). Role Dynamics in Student-AI Collaboration: A Heterogeneous Transition Network Analysis Approach. SSRN preprint. https://doi.org/10.2139/ssrn.6082190
