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
Companion tutorials
We have also released comprehensive new tutorials for the main TNA features:
| Tutorial | Link |
|---|---|
| An Updated Comprehensive Tutorial on Transition Network Analysis (TNA) | https://sonsoles.me/posts/tna-tutorial/ |
| TNA Group Analysis: Analysis and Comparison of Groups | https://sonsoles.me/posts/tna-group/ |
| TNA Clustering: Discovering and Analysis of Clusters | https://sonsoles.me/posts/tna-clustering/ |
| TNA Model Comparison:TNA Model Comparison: A Comprehensive Guide to Network Comparison | https://sonsoles.me/posts/tna-compare/ |
Full reference guide on tna functions |
https://sonsoles.me/tna/tna.html |
Vignettes
Check out the tna R package vignettes:
| Vignette | Link |
|---|---|
| Getting started with tna | https://sonsoles.me/tna/articles/tna.html |
| A showcase of the main tna functions | https://sonsoles.me/tna/articles/complete_tutorial.html |
| How to prepare data for tna | https://sonsoles.me/tna/articles/prepare_data.html |
| Frequency-based TNA | https://sonsoles.me/tna/articles/ftna.html |
| Attention TNA | https://sonsoles.me/tna/articles/atna.html |
| Finding cliques and communities | https://sonsoles.me/tna/articles/communities_and_cliques.html |
| Using grouped sequence data | https://sonsoles.me/tna/articles/grouped_sequences.html |
Book chapters
Do not forget to check out our tutorials in the “Advanced learning analytics methods” book:
| Title | Pages | Tutorial |
|---|---|---|
| Saqr, M., Lopez-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., Lopez-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 |
| Lopez-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 |
Other tools
In addition to the tna R package, you can also try our Shiny app and Jamovi plugin.
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
Load the package
Example data
data("group_regulation", package = "tna")Build a Markov model
tna_model <- tna(group_regulation)
summary(tna_model)| metric | value |
|---|---|
Plot the transition network
# Default plot
plot(tna_model)
# Optimized plot
plot(
tna_model, cut = 0.2, minimum = 0.05,
edge.label.position = 0.8, edge.label.cex = 0.7
) Calculate the centrality measures
cent <- centralities(tna_model)| state | OutStrength | InStrength | ClosenessIn | ClosenessOut | Closeness | Betweenness | BetweennessRSP | Diffusion | Clustering |
|---|---|---|---|---|---|---|---|---|---|
Plot the centrality measures
plot(cent, ncol = 3)Estimate centrality stability
estimate_centrality_stability(tna_model)
#> Centrality Stability Coefficients
#>
#> InStrength OutStrength Betweenness
#> 0.9 0.9 0.9Identify and plot communities
coms <- communities(tna_model)
plot(coms)Find and plot cliques
Compare high achievers (first 1000) with low achievers (last 1000)
tna_model_start_high <- tna(group_regulation[1:1000, ])
tna_model_start_low <- tna(group_regulation[1001:2000, ])
comparison <- permutation_test(
tna_model_start_high,
tna_model_start_low,
measures = c("InStrength")
)Simple comparison vs. permutation test comparison
plot_compare(tna_model_start_high, tna_model_start_low)
plot(comparison)Compare centralities
print(comparison$centralities$stats)| state | centrality | diff_true | effect_size | p_value |
|---|---|---|---|---|
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
