| certainty | R Documentation |
Closed-form alternative to bootstrap_network for transition
networks. Models the outgoing transitions from each state as a
Dirichlet-Multinomial process: with a Jeffreys prior the posterior for state
i is \mathrm{Dirichlet}(c_i + \mathrm{prior}), so each edge is
marginally Beta and its posterior mean, standard deviation, credible interval
and stability decision are available analytically. No resampling, so it runs
in microseconds.
The return value has the same structure as bootstrap_network
(same slots and summary columns) and carries class c("net_certainty",
"net_bootstrap"), so summary() and any code that consumes a
net_bootstrap object work unchanged.
certainty(
x,
prior = 0.5,
ci_level = 0.05,
inference = c("stability", "threshold"),
consistency_range = c(0.75, 1.25),
edge_threshold = NULL
)
x |
A |
prior |
Numeric. Dirichlet prior concentration added to every cell
(default |
ci_level |
Numeric in (0,1). Tail level for credible intervals and the
stability decision (default |
inference |
Character. |
consistency_range |
Numeric vector of length 2. Multiplicative bounds
for stability inference (default |
edge_threshold |
Numeric or NULL. Fixed threshold for
|
Certainty (this function), stability (bootstrap_network) and
reliability (reliability) answer different questions about an
edge: how precisely it is pinned down by the observed counts, whether it
survives resampling the sequences, and whether it is consistent across
split-halves. Certainty and stability agree on homogeneous data; certainty is
over-confident when the data are a mixture of latent classes, because it
treats transitions clustered within a sequence as independent.
An object of class c("net_certainty", "net_bootstrap") with the
same fields as bootstrap_network: original, mean,
sd, p_values, significant, ci_lower,
ci_upper, cr_lower, cr_upper, summary,
model, method, params, ci_level,
inference, consistency_range, edge_threshold, plus
prior and iter = NA (no iterations).
Johnston, L. & Jendoubi, T. (2026). How Delivery Mode Reshapes Resource Engagement: A Bayesian Differential Network Analysis. TNA Workshop 2026.
bootstrap_network, bayes_compare,
network_reliability
seqs <- data.frame(V1 = c("A","B","A","C","B"), V2 = c("B","C","B","A","C"),
V3 = c("C","A","C","B","A"))
net <- build_network(seqs, method = "relative")
cert <- certainty(net)
cert
summary(cert)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.