View source: R/sequence-networks.R
| bootstrap_transition_network | R Documentation |
Bootstrap transition-network edge weights
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
)
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. |
A data frame containing observed edge weights, bootstrap means, standard deviations, and percentile intervals.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.