Changelog
Source:NEWS.md
lagdynamics 0.35.5
- No change to any function. The
legacyci job exports the legacy comparison casesalternative_engines(two-cell and dominance engines against their formulas, an independent computation) andbidirectional_engine(the bidirectional engine againststats::chisq.test()), which were one case until now.
lagdynamics 0.35.4
- No change to any function. The equivalence evidence (
tests/equivalence/, build-ignored) now compares the drawn outputs: the permutation p-values ofcompare_lsa()(per transition and the omnibus) against the label permutation of whole sequences written out in base R; the credible intervals, probability of direction and effect size ofbayes_compare_lsa()against draws of the Dirichlet posterior bygtools::rdirichlet(); and the surrogate test oftransfer_entropy()(te_effective,p) against the source permutation written out. All are seeded Monte Carlo comparisons over three seeds, each number judged at four of its own standard errors. The case-drop shares ofstability_lsa()and the split-half summaries ofreliability_lsa()are now judged the same way, per number, instead of at one tolerance for the whole table. - The two-cell engine is compared with
vcd::loddsratio()(log odds ratio, standard error, z and p); the p-value of the z written out from the definition is labelled as that formula, not asstats.
lagdynamics 0.35.3
- With structural zeros (
loops = FALSEorstructural_zeros) on data that hold transitions in the forbidden cells, the quasi-independence model is now fitted to the possible cells, with the margins of those cells (Bakeman & Quera, 1995, Psychological Bulletin; Bishop, Fienberg & Holland, 1975): the forbidden counts are left out of the expected counts, the adjusted residuals and the tablewise tests. The margins used to keep them, so the expected counts did not sum to the counts being fitted and the tablewise G^2 could be negative:lsa(engagement, loops = FALSE)reported G^2 = -1184.633 with p = 1 and now reports 5.994 on 1 df (p = 0.014), the deviance of the Poisson quasi-independence modelcount ~ from + tofitted byglm()to the six possible cells.lsa_ipf()likewise reproduces the totals of the possible cells. Tables whose forbidden cells are empty are unchanged. The warninglagdynamics_structural_zero_countsis still raised and now says that the counts are left out. -
certainty_lsa()computes the upper tail of the Beta posterior withpbeta(lower.tail = FALSE)instead of1 - pbeta(), which lost relative accuracy for masses below about 1e-16 (Average -> Average inengagement: 3.14102e-17, now 3.14168e-17). No certainty decision changes.
lagdynamics 0.35.2
-
print()of a fit counts significant transitions out of the cells that were tested. Withloops = FALSEthe self-transitions are structural zeros without a p-value; the header said “of 81” on a nine-state table where 72 cells are tested, and now says “of 72”.
lagdynamics 0.35.0
CRAN release: 2026-11-18
This release collects all changes since the CRAN release 0.32.
Changes to results
-
summary()on a fit now returns asummary.lsaobject instead of printing the fit and its matrices. The object holds two tidy tables, a one-row overview and a per-state activity table; it prints when shown, andas.data.frame(summary(fit), what = "nodes")returns either table. Grouped fits are unchanged (one row per group). -
transition_probabilities()now returns a tidy data frame with columnsfrom,toandprob(one row per pair of states; grouped fits gain a leadinggroupcolumn) instead of a matrix or a list of matrices. -
as.data.frame()oncompare_lsa()andbayes_compare_lsa()results gainswhat = "global"for the omnibus test, and onreliability_lsa()resultswhat = "summary"for a one-row summary of the replicates.
Reliability and stability
-
reliability_lsa()andstability_lsa()now treat only the documented degenerate case (a resample with no transitions) as a failed replicate; any other error is reported to the caller. The number of failed replicates is stored in the result (n_failed) and shown byprint().
Errors and output
- User-facing errors are classed conditions:
lagdynamics_bad_input,lagdynamics_needs_events,lagdynamics_no_transitions,lagdynamics_unknown_engine,lagdynamics_unsupported_option,lagdynamics_incompatible_fits,lagdynamics_missing_packageandlagdynamics_ipf_infeasible, each also of classlagdynamics_error. - Console output and plot subtitles use ASCII replacements for the block glyph, the superscript in G^2 and the middle dot when the session is not UTF-8.
-
transfer_entropy(seed = )andbayes_compare_lsa(seed = )restore the caller’s random number stream on exit.
Documentation
- New documentation structure. Vignettes: lag sequential analysis, lag transition networks, evaluating transitions and comparing groups. Guides (on the package website): a complete workflow, event logs and interoperability, engines, lags and structural zeros, plotting, and transfer entropy. Case studies: course engagement, regulation in high and low achieving groups, and AI behaviour in programming sessions.
lagdynamics 0.32
CRAN release: 2026-07-21
New features
-
transitions()now reads inference results, not only fitted models. It accepts the output ofbootstrap_lsa(),certainty_lsa(),stability_lsa(),permute_lsa(),compare_lsa(),bayes_compare_lsa()andlsa_lags(), and returns the same tidy one-row-per-transition data frame.significant = TRUEkeeps the transitions the method itself flags, andsort = "strength"orders them by that method’s signed effect. Previously the per-transition table of an inference result was reachable only throughas.data.frame(), because the print methods show a header summary alone. - The
transitions()generic is nowtransitions(fit, ...), so each class declares only the arguments backed by columns it actually has. Existing calls on a fit are unaffected.
Documentation
- Vignettes restore the user’s
options()after changingdigits, as CRAN requires. - Vignettes read every result with
transitions()rather than coercing it withas.data.frame(), and select rows with thesignificantargument rather than subsetting. - Removed the citations, reference lists, DOIs, documentation URLs and linked author metadata that 0.31 added to the shipped vignettes.
lagdynamics 0.31
CRAN candidate
- Prepared the package for first CRAN submission.
- Moved
ggplot2andcographfrom Suggests to Imports so the plotting surface works out of the box; plotting examples now run during checks. The analytical core still depends only on base R. - Added a dedicated interoperability vignette covering wide data, long event logs,
tna,Nestimate,cograph, andlsa_to_tna(). - Added linked author metadata and Dynalytics framework links to all shipped vignettes.
- Restored
lsa_to_tna()for handing anlsafit totnatooling. - Added ingestion of
Nestimate::build_network()netobjects through their prepared sequence data. - Stored the bundled
engagementdata as a data frame sotna::tna(engagement)works directly. - Removed dead package-site URLs from CRAN-visible metadata.
- Added future CRAN installation instructions to the README.
- Included
NEWS.mdin the source package.
lagdynamics 0.3.0
Interoperability and documentation
- Added integration tests for
cograph,Nestimate, and the Dynalytics evidence surface. - Added native TNA-style aliases:
weights = "tna"andweights = "relative"now map to transition probabilities. - Updated plotting documentation and vignettes to use
weights = "tna"for probability-weighted transition networks. - Added and reorganised vignettes:
-
intro: conceptual overview and package map. -
lagdynamics: concise quick start. -
workflow: complete applied workflow. -
interop: interoperability with sibling packages. -
lag-transition-networks: transition-network interpretation. -
confirmatory: evidence and uncertainty workflow. -
plotting: plot gallery.
-
- Removed public documentation references to unexported internals.
- Made long-format input more flexible:
actionis the only mandatory long-format column, with optionalactor,session,time, andorder. - Added warnings for single-sequence bootstrap and permutation cases where the requested procedure has limited inferential meaning.
lagdynamics 0.2.0
Confirmatory workflow and group comparison
- Added the Dynalytics-style confirmatory evidence battery:
certainty_lsa(),bootstrap_lsa(),reliability_lsa(),stability_lsa(), andpermute_lsa(). - Added group comparison with
compare_lsa()and Bayesian group comparison withbayes_compare_lsa(). - Added grouped
lsa()fits throughgroup = ..., with grouped methods fortransitions(),nodes(),tests(),initial(), plotting, reliability, and comparison workflows. - Added tidy
as.data.frame()methods for inference and comparison result objects. - Added the unified plotting surface: residual heatmaps, residual networks, TNA probability networks, chord diagrams, sunbursts, uncertainty forests, and group-comparison plots.
- Added native transition and initial probabilities:
transition_probabilities()andinitial(). - Added bundled long-format data for examples and tests.
lagdynamics 0.1.0
Initial implementation
- Created a from-scratch, clean-room implementation of lag sequential analysis for categorical event sequences.
- Added the unified
lsa()constructor and canonical sequence handling throughlsa_data()andlsa_transitions(). - Added five built-in engines:
classical,two_cell,bidirectional,parallel_dominance, andnonparallel_dominance. - Added convenience wrappers:
lsa_classical(),lsa_two_cell(),lsa_bidirectional(),lsa_parallel_dominance(), andlsa_nonparallel_dominance(). - Added the pluggable engine registry:
register_lsa_engine(),get_lsa_engine(),list_lsa_engines(), andunregister_lsa_engine(). - Added tidy reading verbs:
transitions(),nodes(),tests(),initial(), andsummary(). - Added multi-lag helpers with
lsa_lags()andlag_profile(). - Added structural-zero handling through
loops = FALSEand arbitrary structural-zero matrices. - Added experimental
transfer_entropy()for directed categorical information-flow analysis. - Kept runtime dependencies minimal: only base R packages are imported (
grDevices,grid,stats, andutils).