bootstrap_transition_network: Bootstrap transition-network edge weights

View source: R/sequence-networks.R

bootstrap_transition_networkR Documentation

Bootstrap transition-network edge weights

Description

Bootstrap transition-network edge weights

Usage

bootstrap_transition_network(
  data,
  sequence_id_col = "sequence_id",
  order_col = "sequence_order",
  state_col = "state",
  n_boot = 100L,
  level = 0.95,
  seed = 1L,
  include_self = TRUE
)

Arguments

data

Long-format sequence data.

sequence_id_col, order_col, state_col

Sequence columns.

n_boot

Number of bootstrap samples of whole sequences.

level

Confidence level for percentile intervals.

seed

Reproducibility seed.

include_self

Include self-transitions.

Value

A data frame containing observed edge weights, bootstrap means, standard deviations, and percentile intervals.

Examples

sequences <- data.frame(
  sequence_id = rep(c("s1", "s2", "s3", "s4"), each = 4L),
  sequence_order = rep(1:4, times = 4L),
  state = c("A", "B", "C", "D", "A", "B", "C", "C",
            "D", "C", "B", "A", "D", "C", "A", "A"),
  group = rep(c("g1", "g2"), each = 8L),
  stringsAsFactors = FALSE
)
bootstrap_transition_network(sequences, n_boot = 5L, seed = 1L)


gp3sequences documentation built on Aug. 23, 2026, 5:10 p.m.