Package: lagdynamics 0.32

Mohammed Saqr

lagdynamics: Lag Sequential Analysis, Dynamics, and Lag Transition Networks

A modern, tidy toolkit for lag sequential analysis and lag transition networks of categorical event and sequence data. It provides an accessible, unified workflow for fitting, inspecting, visualising, and comparing lagged transition patterns, with tidy outputs throughout. Includes confirmatory tools for uncertainty, robustness, and group differences, including bootstrap intervals, analytic certainty, split-half reliability, case-drop stability, permutation tests, and Bayesian group comparisons. Supports long-format event-log import, import from common sequence and state-sequence objects, multi-lag analysis, structural-zero constraints, transition and initial probabilities, plotting of transition structures, and a directed transfer-entropy measure. The lag sequential analysis framework follows Sackett and others (1979) <doi:10.3758/BF03205679>.

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

lagdynamics_0.32.tar.gz
lagdynamics_0.32.tar.gz(r-4.7-any)lagdynamics_0.32.tar.gz(r-4.6-any)
lagdynamics_0.32.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
lagdynamics/json (API)

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

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

Datasets:

On CRAN:

Conda:

3.54 score 33 exports 20 dependencies

Last updated from:c2336c6daa. Checks:4 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK202
source / vignettesOK240
linux-release-x86_64OK199
wasm-releaseOK131

Exports:bayes_compare_lsabootstrap_lsacertainty_lsacompare_lsaget_lsa_engineinitiallag_profilelist_lsa_engineslsalsa_bidirectionallsa_classicallsa_datalsa_ipflsa_lagslsa_nonparallel_dominancelsa_parallel_dominancelsa_to_tnalsa_transitionslsa_two_cellnodespermute_lsaplot_chordsplot_forestplot_polarplot_transitionsregister_lsa_enginereliability_lsastability_lsateststransfer_entropytransition_probabilitiestransitionsunregister_lsa_engine

Dependencies:clicographcpp11farverggplot2gluegtableisobandlabelinglatticelifecycleMatrixR6RColorBrewerrlangS7scalesvctrsviridisLitewithr

A complete workflow: from sequences to a group comparison
Define the sequence data | Fit the model | Read the fitted transitions | Visualise the fitted model | Add uncertainty evidence | Start from a raw event log | Fit groups | Compare groups | In short

Last update: 2026-07-21
Started: 2026-07-21

Confirmatory testing: matching claims to evidence
A specific transition: edge-level uncertainty | A significant transition: robustness to information loss | The whole network: structural reliability | More than chance: an assumption-free null | Two groups: inference under exchangeability | In short

Last update: 2026-07-21
Started: 2026-07-21

Get started with lagdynamics
Fit a model | Read the result | Plot the model | Check uncertainty | Where next

Last update: 2026-07-21
Started: 2026-07-21

Interoperability: wide data, long logs, tna, and Nestimate
Same grammar as TNA | Wide sequence data | Long event logs | tna objects | Nestimate objects | Back to tna

Last update: 2026-07-21
Started: 2026-07-21

Introduction
Summary | The method | What the package provides | Fitting and reading a model | Visualisation | Group comparison | Confirmatory battery | Interoperability | Bundled data

Last update: 2026-07-21
Started: 2026-07-21

Lag transition networks
The data and the fitted model | Reading the model | The network | Inference | Summary

Last update: 2026-07-21
Started: 2026-07-21

Plotting lag-sequential models
Residual heatmap | Residual network | Transition network (a TNA model) | Chord and sunburst | Uncertainty forests | Group comparison | Grouped fits | The worker functions | In short

Last update: 2026-07-21
Started: 2026-07-21

Readme and manuals

Help Manual

Help pageTopics
Human-AI Vibe Coding Interaction Eventsai_long
Tidy a Group Comparisonas.data.frame.lsa_comparison as.data.frame.lsa_comparison_pairwise
Tidy the Canonical Sequence Objectas.data.frame.lsa_data
Tidy the per-replicate split-half correlationsas.data.frame.lsa_reliability as.data.frame.lsa_reliability_group
Bayesian Comparison of Group Transition Structures (Dirichlet-Multinomial)bayes_compare_lsa
Bootstrap Confidence Intervals for an LSA Fitbootstrap_lsa
Analytic Certainty of Transition Edges (Dirichlet-Multinomial)certainty_lsa
Compare Groups' Transition Structurescompare_lsa
Student Engagement Trajectoriesengagement
Retrieve a Registered LSA Engineget_lsa_engine
Collaborative Learning Self-Regulation Sequencesgroup_regulation
Group Regulation Long Event Loggroup_regulation_long
Initial-State Distribution of an LSA Fit (Tidy)initial initial.lsa initial.lsa_group
Lag Profile of a Single Transitionlag_profile
List All Registered LSA Engineslist_lsa_engines
Lag Sequential Analysislsa lsa_bidirectional lsa_classical lsa_nonparallel_dominance lsa_parallel_dominance lsa_two_cell
Canonicalize Sequence Input for Lag Sequential Analysislsa_data
Iterative Proportional Fitting for Two-Way Tables with Structural Zeroslsa_ipf
Lag Sequential Analysis Across Several Lagslsa_lags
Convert an lsa Fit to a tna Networklsa_to_tna lsa_to_tna.lsa lsa_to_tna.lsa_group
Tidy Transition Counts at a Given Laglsa_transitions
Nodes of an LSA Fit (Tidy)nodes nodes.lsa nodes.lsa_group
Permutation Test for an LSA Fitpermute_lsa
Circular (Chord) Diagram of an LSA Fitplot_chords
Circular Bootstrap Forest of an LSA Fitplot.lsa_bootstrap plot_forest
Polar Sunburst of an LSA Fitplot_polar
Plot the Transition Networkplot_transitions
Plot an LSA Fitplot.lsa plot.lsa_group
Plot an Analytic-Certainty Resultplot.lsa_certainty
Plot a Group Comparisonplot.lsa_comparison plot.lsa_comparison_pairwise
Register a Lag Sequential Analysis Engineregister_lsa_engine
Split-Half Reliability for an LSA Fitreliability_lsa reliability_lsa.lsa reliability_lsa.lsa_group
Case-Drop Stability for an LSA Fitstability_lsa
Tablewise Independence Tests of an LSA Fit (Tidy)tests tests.lsa tests.lsa_group
Directed transfer entropy for categorical sequences (experimental)transfer_entropy
Transition-Probability Matrix of an LSA Fittransition_probabilities transition_probabilities.lsa transition_probabilities.lsa_group
Transitions of an LSA Fit or an Inference Result (Tidy)transitions transitions.lsa transitions.lsa_bootstrap transitions.lsa_certainty transitions.lsa_comparison transitions.lsa_comparison_pairwise transitions.lsa_group transitions.lsa_lags transitions.lsa_permutation transitions.lsa_stability
Remove a Registered LSA Engineunregister_lsa_engine