htna 0.3.7
- The start and end states added with
build_htna(start = , end = )have an actor type of their own,"Boundary", so such a network can be plotted, summarized, compared and converted like any other. In the plots the actor types keep the positions they have without these states; the start state is drawn at the top centre and the end state at the bottom centre. - The legend of
plot_htna_bootstrap()andplot_htna_diff()showed the colours of the actor types in reverse order; it now matches the nodes. - A cohort built with
node_groupsandgroupthat lacks a code is consistent throughout (node and edge counts, edge list), andpermutation_htna()andbayes_compare_htna()compare cohorts that do not hold the same codes. -
frequencies_htna()accepts a grouped network and returns one table for all cohorts, with columnsgroup(the cohort) andactor. -
sequence_compare_htna()takes the name of a session-level column ingroup, for examplegroup = "phase", as well as a vector. -
build_htna(method = "latency")stops with a clear error of classhtna_tied_timeswhen the event times are tied within sessions, as in the bundledhuman_ai, which records one time per session. - Sequence plots leave out an actor type that has no event in the sessions.
htna 0.3.6
-
build_htna()has atimeargument naming the column with the time of each event. With it the events are ordered by time and theordercolumn is not needed. It makesmethod = "latency"of Nestimate 1.0.20 available, a network in which each reply is weighted by its speed. -
summary()of an undirected network (method = "co_occurrence") counts each edge once, in the header and in the actor-pair table, which has one row per unordered pair of actor types. The counts agree with the network metrics of Nestimate 1.0.7 and later and withas.data.frame(). -
print()of acentrality_stability_htna()result says when whole actors were dropped (actor), and its plot labels the axis accordingly. -
certainty_htna()keeps the actor types on its result, andplot_htna_bootstrap()draws it. - Help pages name the settings recent Nestimate versions added: nested mosaics,
targetfor case-dropping reliability,formatfor association rules, and the estimation methods"reverse","ngram","gap"and"latency".
htna 0.3.5
This section covers all changes since the CRAN release 0.3.1.
New features
-
bootstrap()andplot_sequences()reach the htna methods whichever of htna and tna is attached last: the methods are also registered on tna’s generics of the same names. Throughtna::bootstrap(), tna’s argument names (level,method,threshold) are mapped onto those ofbootstrap_htna()(ci_level,inference,edge_threshold). -
centrality_stability_htna()passes further arguments toNestimate::centrality_stability()through..., as the other wrappers do, so Nestimate’sactorargument (resample whole actors) reaches it. - Result objects have tidy accessors.
as.data.frame()returns the edges (with the actor types of source and target) or the nodes of an htna network or grouped network; the tables of asummary()(what = "actors","actor_pairs","metrics"); the actor-pair, edge, metric and network tables of acompare_htna()result; and the CS coefficients or correlation traces ofcentrality_stability_htna(). Grouped results are stacked with agrouporcomparisoncolumn. -
compare_htna()results haveprint()andsummary()methods; a grouped comparison prints one block per cohort pair instead of the raw list. - Grouped bootstraps (
bootstrap_htna()on anhtna_group) haveprint()andsummary()methods, and grouped stability results asummary(). -
plot_htna_diff()draws a groupedbayes_compare_htna()result, one difference network per cohort pair. - Errors are classed conditions inheriting from
htna_error(htna_bad_input,htna_missing_column,htna_actor_conflict,htna_unassigned_node,htna_empty_input,htna_missing_package,htna_unnamed_nodes), documented in the Conditions section of each help page.
Changes
-
summary()of an htna network or grouped network returns asummary.htna/summary.htna_groupobject that prints the same report; it no longer prints as a side effect of the call. -
build_htna(group = )returns the cohorts in the order of the levels when the grouping column is a factor (forhuman_ai,EarlythenLate), so grouped comparisons are named"Early vs Late". Character grouping columns keep their previous order. -
build_htna()detects a code used by two actors also when there are three or more actor types and the code is not used by all of them. -
as.data.frame()on an htna network now returns htna’s edge table (with actor columns) instead of cograph’s. - The centrality stability plot uses the Okabe-Ito palette, distinguishes the measures by line type and point shape as well as colour, titles each cohort’s chart with the cohort name, and raises a classed error when ‘ggplot2’ is not installed.
- Unused suggested packages ‘codyna’ and ‘janitor’ were removed.
Documentation
- Help pages were rewritten to describe the method each function implements, with return structures, conditions and runnable examples on the bundled data. Examples no longer reach into result objects.
- New vignette “Grouped heterogeneous transition networks”; the main vignette sets out the model and a complete analysis.
- New guides “Comparing networks” and “Sequences and patterns” (replacing the sequence plot and sequence comparison articles), and two case studies on the vibe-coding sessions. “Input formats” is now a guide on the package website.
- The examples of
sequence_plot_htna()andplot_sequences()use one project, so they run quickly when the ‘stringdist’ package is not available. - Corrected return-value documentation of
markov_order_test_htna(),sequence_compare_htna(),state_distribution_htna(),pruning_details_htna()andplot_htna()(0.3.2).
Tests
- The shipped tests no longer compare against ‘Nestimate’ or ‘tna’; those comparisons moved to a local equivalence suite. The Edge Count test of
summary()follows the network’sdirectedflag, for CRAN ‘Nestimate’ and ‘Nestimate’ 1.0.7 or later (0.3.3, 0.3.4).
htna 0.3.1
CRAN release: 2026-07-28
Fitted MMM conversion
-
build_htna()now explicitly consumes the fittednet_mmmobject returned byNestimate::cluster_mmm(). It materializes one HTNA network per fitted sequence cluster without rerunning MMM and preserves assignments, posterior probabilities, mixing proportions, information criteria, fitted weights, and the original actor partition. -
Nestimate::as_htna()now supports the same fittednet_mmminput and returns an equivalenthtna_group.Nestimate::cluster_network()remains the function that directly returns materialized cluster networks.
Datasets
- New per-actor long frames
human_simplifiedandai_simplified, ready for the named-list form ofbuild_htna(). - New tidy code → actor-type lookup
human_ai_codebook, ready to pass asnode_groupstobuild_htna(). -
human_aigains aphasefactor column tagging each session as"Early"or"Late"(chronological split), so grouped examples can callbuild_htna(human_ai, group = "phase")without pre-processing.
Documentation
-
htna_paletteis now exported (previously an internal constant referenced as a default argument in exported plot functions). - New article vignette Clustering inputs to
build_htna()coveringNestimate::build_clusters()andNestimate::cluster_mmm(), model selection withcluster_choice()/compare_mmm()/cluster_diagnostics(), and cohort-pair comparison withcompare_htna().
htna 0.3.0
Actor-aware interoperability and comparison
- Added
compare_htna(), an actor-aware wrapper overNestimate::compare_model(). It aligns partial node coverage, annotates every edge with source and target actors, reports summaries for each actor-pair block, retains the original HTNA networks, and compares every cohort pair when passed anhtna_group. - Added
as.igraph()methods forhtnaandhtna_group. Converted graphs preserve actor types as vertex attributes and canonical actor ordering as graph metadata; grouped inputs convert every cohort. -
summary.htna()andsummary.htna_group()now include Nestimate’s standard network-level descriptive metrics alongside the existing actor-partition and actor-to-actor edge summaries. -
build_htna(method = "co_occurrence")is now documented and covered across all constructor forms, grouped networks, MCML expansion, Nestimate distance clustering, and legacy TNA clustering, with numerical equivalence tests against both Nestimate andtna::ctna().
htna 0.2.2
MCML expansion
-
build_htna()now accepts a fittedNestimate::build_mcml()object. The MCML node clusters become actor groups, and one full node-level HTNA is rebuilt from the retained or explicitly supplied original source. This is equivalent toNestimate::as_htna(): it intentionally preserves global cross-cluster transitions rather than stitching together fitted macro or within-cluster weights. - HTNA partition injection now consistently stores character labels in
$node_groups$groupand a factor with the full actor level set in$nodes$groups.
htna 0.2.0
New features
-
build_htna()now consumes Nestimate distance clustering (net_clustering), fitted MMM clustering (cluster_mmm()/net_mmm), materialized cluster networks (netobject_group), and legacytna::cluster_sequences()results. It returns anhtna_group, restores the actor partition on every child, and preserves clustering assignments, posterior probabilities, diagnostics, and fitted MMM weights. A partition preserved upstream is used automatically; older or independently-created clustering results can supplynode_groups.
Six htna-named functions are added, extending htna’s coverage of the major transition-network-analysis (tna) verbs. All are thin ...-forwarding wrappers over the ‘Nestimate’ engine and follow the same durable design as the existing re-exports (stable documented formals; new engine arguments flow through ...).
- Pruning family —
prune_htna(),deprune_htna(),reprune_htna(), andpruning_details_htna()(overNestimate::net_prune()and friends). The actor partition andhtnaclass are preserved across pruning, so the pruned network stays htna-aware and plots with [plot_htna()]. -
bayes_compare_htna()— Bayesian complement ofpermutation_htna()(overNestimate::bayes_compare()). Preserves the actor partition on$x/$yand carries classnet_permutation, so it renders withplot_htna_diff(). -
certainty_htna()— closed-form counterpart ofbootstrap_htna()(overNestimate::certainty()), joining the confirmatory-analysis family alongsidereliability_htna()andcasedrop_reliability_htna().
htna 0.1.2
- The six re-exported Nestimate functions (
permutation_htna(),association_rules_htna(),casedrop_reliability_htna(),markov_order_test_htna(),state_distribution_htna(),state_frequencies_htna()) are now thin...-forwarding wrappers instead of direct aliases. Their documented formals are fixed, so a future change to any of these functions’ signatures in Nestimate can no longer produce a code/documentation-mismatch (codoc)WARNINGinR CMD check. No behavioural change: each call forwards unchanged to Nestimate (including S3 dispatch forstate_distribution_htna()), and extra arguments pass straight through.... -
sequence_compare_htna()no longer restates Nestimate’ssequence_compare()arguments (sub,min_freq,test,iter,adjust) as its own formals; they now pass through.... Its signature isx, group, level, ...— the htna-specificlevelargument is retained. Same defaults and behaviour, but new Nestimate arguments flow through automatically and the code/documentation coupling is removed.mosaic_plot_htna()’s documentation is likewise decoupled from Nestimate’s signature (it was already a...wrapper).
htna 0.1.1
- Compatibility with Nestimate 0.8.0.
Nestimate::permutation()gained ameasuresargument (for centrality permutation tests); sincepermutation_htna()re-exports that function, its documentation is regenerated to include the new argument, resolving a code/documentation mismatch flagged byR CMD check. No behavioural change. -
Imports: Nestimate (>= 0.8.0).
htna 0.1.0
CRAN release: 2026-07-06
- Initial release.
- Builds heterogeneous transition networks for sequences mixing two or more actor groups (e.g. Human and AI) within the same interaction, via
build_htna(). - Re-exports the most commonly used
Nestimateandcographdownstream functions under_htna-suffixed aliases so callers do not need to attachNestimateorcographexplicitly:permutation_htna(),casedrop_reliability_htna(),markov_order_test_htna(),mosaic_plot_htna(),state_distribution_htna(),state_frequencies_htna(),association_rules_htna(),sequence_compare_htna(). - htna-side wrappers add ergonomics over the upstream API:
frequencies_htna(),plot_frequencies_htna()(treemap / bars / facet views),centralities_htna(),plot_centralities(),plot_htna(),plot_htna_bootstrap(),plot_htna_diff(),sequence_plot_htna(),reliability_htna(),centrality_stability_htna(),edge_betweenness_htna(),extract_meta_paths()(state-level by default;level = "type"for the type-level meta-path rollup; supports schemas mixing types, concrete codes, and*).
