Package: lagseq 0.1.0

Mohammed Saqr

lagseq: Modern Lag Sequential Analysis with Tidy Transition Networks

A modern, tidy, pipe-friendly toolkit for lag sequential analysis of categorical event sequences. A single 'lsa()' constructor fits classical, two-cell, bidirectional, and dominance engines through a pluggable registry, with multi-lag analysis and structural-zero constraints, and every result is read through a verb that returns a tidy one-row-per-observation data frame. A confirmatory testing battery quantifies the evidence behind each claim: sequence-level bootstrap and analytic Dirichlet-Multinomial certainty for edge uncertainty, split-half reliability for the whole network, case-drop stability, permutation tests, and permutation- and Bayesian-based group comparison. Fits visualize through a single 'plot()' verb (residual heatmap, transition network, chord, sunburst, and forest views) and interoperate with the 'tna', 'Nestimate', and 'TraMineR' ecosystems, both ingesting their sequence objects and converting to network objects. All numerical methods are implemented from primary literature and cross-validated against published worked examples and base-R primitives.

Authors:Mohammed Saqr [aut, cre, cph]

lagseq_0.1.0.tar.gz
lagseq_0.1.0.zip(r-4.7)lagseq_0.1.0.zip(r-4.6)lagseq_0.1.0.zip(r-4.5)
lagseq_0.1.0.tgz(r-4.6-any)lagseq_0.1.0.tgz(r-4.5-any)
lagseq_0.1.0.tar.gz(r-4.7-any)lagseq_0.1.0.tar.gz(r-4.6-any)
lagseq_0.1.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html
card.svg |card.png
lagseq/json (API)

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

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

Datasets:

On CRAN:

Conda:

4.00 score 1 scripts 31 exports 0 dependencies

Last updated from:cf0ee1b6ee. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK170
source / vignettesOK217
linux-release-x86_64OK159
macos-release-arm64OK106
macos-oldrel-arm64OK103
windows-develOK135
windows-releaseOK124
windows-oldrelOK149
wasm-releaseOK101

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_lsateststransitionsunregister_lsa_engine

Dependencies:

A complete workflow: from sequences to a group comparison

Rendered fromworkflow.Rmdusingknitr::rmarkdownon Jun 20 2026.

Last update: 2026-06-20
Started: 2026-06-19

Confirmatory testing: matching claims to evidence

Rendered fromconfirmatory.Rmdusingknitr::rmarkdownon Jun 20 2026.

Last update: 2026-06-20
Started: 2026-06-20

Get started with lagseq

Rendered fromlagseq.Rmdusingknitr::rmarkdownon Jun 20 2026.

Last update: 2026-06-20
Started: 2026-06-04

Interoperability with tna and Nestimate

Rendered frominterop.Rmdusingknitr::rmarkdownon Jun 20 2026.

Last update: 2026-06-20
Started: 2026-06-20

Plotting lag-sequential models

Rendered fromplotting.Rmdusingknitr::rmarkdownon Jun 20 2026.

Last update: 2026-06-20
Started: 2026-06-04

Readme and manuals

Help Manual

Help pageTopics
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 correlations.as.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
IMDB Primary-Genre Sequence (1970-2024)imdb_genres
Initial-State Distribution of an LSA Fit (Tidy)initial initial.lsa initial.lsa_group
Knowledge-Graph Learning Logs (Du Jun 2026, 29 learners)kg_logs
Published LSA Results for the Knowledge-Graph Datasetkg_lsa_oracle
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
Canonical LSA Worked Example (O'Connor 1999)oconnor_couple
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
Grandmother Behaviour Transitions, Qi An et al. (2026)qi2026_grandmother
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
Transitions of an LSA Fit (Tidy)transitions transitions.lsa transitions.lsa_group
Remove a Registered LSA Engineunregister_lsa_engine