Skip to contents

Overview

htna htna-package
htna: Heterogeneous Transition Network Analysis

Building networks

Estimate a heterogeneous transition network, one per cohort, or one per cluster, and read it as tables.

build_htna()
Build a heterogeneous transition network
summary(<htna>) summary(<htna_group>) print(<summary.htna>) print(<summary.htna_group>) as.data.frame(<summary.htna>) as.data.frame(<summary.htna_group>)
Summarize a heterogeneous transition network
as.data.frame(<htna>) as.data.frame(<htna_group>)
Tabulate the edges and nodes of an htna network
as.igraph(<htna>) as.igraph(<htna_group>)
Convert an htna network to an igraph graph

Network plots

Draw a network with each actor’s codes on its own arc, and the difference between two networks.

plot_htna() plot(<htna>) plot(<htna_group>)
Plot a heterogeneous transition network
plot_htna_diff()
Plot the difference between two htna networks
htna_palette
Colours of the actor types in htna plots

Pruning

Set weak edges aside, restore them, and list what was removed.

prune_htna()
Remove weak edges from a heterogeneous transition network
deprune_htna()
Restore the edges removed by pruning
reprune_htna()
Re-apply a recorded pruning rule
pruning_details_htna()
List the edges removed by pruning

Frequencies and distributions

How often each code occurs, within each actor and overall, and the associations between codes and sessions.

frequencies_htna()
Count the codes of each actor in a network
plot_frequencies_htna()
Plot the frequencies of the codes of an htna network
state_frequencies_htna()
Count the codes of a network over all actors
state_distribution_htna()
Tabulate the distribution of the codes within each actor
mosaic_plot_htna()
Plot a chi-square mosaic of the transitions of an htna network

Sequences

The sessions as sequences of codes, and the comparison of short patterns between groups of sessions.

sequence_plot_htna() plot_sequences(<htna>)
Plot the sessions of an htna network as sequences
plot_sequences()
Plot sequences
sequence_compare_htna()
Compare short sequence patterns between groups of sessions

Paths and patterns

Recurring paths, meta-paths of turn-taking, and association rules.

extract_meta_paths()
Count recurring paths and meta-paths in the sessions
print(<htna_paths>)
Print a table of paths or meta-paths
association_rules_htna()
Mine association rules from the sessions of a network

Centrality

The position of each code in the network and of each edge on shortest paths.

centralities_htna()
Compute node centralities of an htna network
plot_centralities()
Plot node centralities of an htna network
edge_betweenness_htna()
Compute the edge betweenness of an htna network
plot_edge_betweenness_htna()
Plot the edge betweenness of an htna network

Comparing networks

Descriptive, permutation and Bayesian comparison of two networks or of the cohorts of a grouped network.

compare_htna()
Describe the differences between heterogeneous transition networks
print(<htna_comparison>) summary(<htna_comparison>) as.data.frame(<htna_comparison>) print(<htna_comparison_group>) summary(<htna_comparison_group>) as.data.frame(<htna_comparison_group>)
Print, summarize and tabulate an htna network comparison
plot(<htna_comparison_group>)
Plot the comparisons of a grouped network
permutation_htna()
Test differences between networks by permutation
bayes_compare_htna()
Compare networks edge by edge with a Bayesian model

Model assessment

Certainty of the edges, reliability and stability of the estimates, and the adequacy of a first-order model.

bootstrap_htna() bootstrap(<htna>)
Bootstrap the edges of a heterogeneous transition network
bootstrap()
Bootstrap a network
print(<htna_bootstrap_group>) summary(<htna_bootstrap_group>)
Print and summarize the bootstraps of a grouped network
plot_htna_bootstrap() plot(<htna_bootstrap>)
Plot the bootstrap-assessed edges of an htna network
certainty_htna()
Estimate the closed-form certainty of the edge weights
reliability_htna()
Estimate the split-half reliability of a heterogeneous transition network
casedrop_reliability_htna()
Assess the case-dropping stability of the edge weights
centrality_stability_htna()
Assess the case-dropping stability of node centralities
print(<htna_stability>) print(<htna_stability_group>)
Print centrality stability coefficients
plot(<htna_stability>) plot(<htna_stability_group>)
Plot centrality stability against the proportion of sessions dropped
as.data.frame(<htna_stability>) as.data.frame(<htna_stability_group>) summary(<htna_stability_group>)
Tabulate centrality stability results
markov_order_test_htna()
Test the Markov order of the sessions

Data

Coded sessions of programmers working with an AI coding agent.

human_ai
Human and AI turns in vibe-coding sessions
human_simplified
Human turns of the vibe-coding sessions
ai_simplified
AI turns of the vibe-coding sessions
human_ai_codebook
Code-to-actor codebook for the vibe-coding data