tna
: An R package for Transition Network Analysis
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., 2024) for more details on TNA. Also, check out our tutorials on the basics of TNA, frequency-based TNA, and clustering with TNA.
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 library
library("tna")
Example data
data("group_regulation", package = "tna")
Build a Markov model
tna_model <- tna(group_regulation)
summary(tna_model)
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)
cent <- centralities(tna_model)