Skip to contents

lagdynamics 0.35.5

  • No change to any function. The legacy ci job exports the legacy comparison cases alternative_engines (two-cell and dominance engines against their formulas, an independent computation) and bidirectional_engine (the bidirectional engine against stats::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 of compare_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 of bayes_compare_lsa() against draws of the Dirichlet posterior by gtools::rdirichlet(); and the surrogate test of transfer_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 of stability_lsa() and the split-half summaries of reliability_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 as stats.

lagdynamics 0.35.3

  • With structural zeros (loops = FALSE or structural_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 model count ~ from + to fitted by glm() to the six possible cells. lsa_ipf() likewise reproduces the totals of the possible cells. Tables whose forbidden cells are empty are unchanged. The warning lagdynamics_structural_zero_counts is still raised and now says that the counts are left out.
  • certainty_lsa() computes the upper tail of the Beta posterior with pbeta(lower.tail = FALSE) instead of 1 - pbeta(), which lost relative accuracy for masses below about 1e-16 (Average -> Average in engagement: 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. With loops = FALSE the 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 a summary.lsa object 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, and as.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 columns from, to and prob (one row per pair of states; grouped fits gain a leading group column) instead of a matrix or a list of matrices.
  • as.data.frame() on compare_lsa() and bayes_compare_lsa() results gains what = "global" for the omnibus test, and on reliability_lsa() results what = "summary" for a one-row summary of the replicates.

Reliability and stability

  • reliability_lsa() and stability_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 by print().

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_package and lagdynamics_ipf_infeasible, each also of class lagdynamics_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 = ) and bayes_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 of bootstrap_lsa(), certainty_lsa(), stability_lsa(), permute_lsa(), compare_lsa(), bayes_compare_lsa() and lsa_lags(), and returns the same tidy one-row-per-transition data frame. significant = TRUE keeps the transitions the method itself flags, and sort = "strength" orders them by that method’s signed effect. Previously the per-transition table of an inference result was reachable only through as.data.frame(), because the print methods show a header summary alone.
  • The transitions() generic is now transitions(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 changing digits, as CRAN requires.
  • Vignettes read every result with transitions() rather than coercing it with as.data.frame(), and select rows with the significant argument 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 ggplot2 and cograph from 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, and lsa_to_tna().
  • Added linked author metadata and Dynalytics framework links to all shipped vignettes.
  • Restored lsa_to_tna() for handing an lsa fit to tna tooling.
  • Added ingestion of Nestimate::build_network() netobjects through their prepared sequence data.
  • Stored the bundled engagement data as a data frame so tna::tna(engagement) works directly.
  • Removed dead package-site URLs from CRAN-visible metadata.
  • Added future CRAN installation instructions to the README.
  • Included NEWS.md in 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" and weights = "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: action is the only mandatory long-format column, with optional actor, session, time, and order.
  • 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

lagdynamics 0.1.0

Initial implementation