| bootstrap_tna | R Documentation |
Bootstrap a TNA model
bootstrap_tna(
data,
model = c("tna", "ftna", "ctna", "atna"),
repetitions = 100L,
fraction = 1,
format = c("auto", "long", "wide"),
id = "id",
period = "period",
state = "state",
group = NULL,
seed = NULL,
...
)
data |
Sequence data in long or wide form. |
model |
TNA estimator, one of |
repetitions |
Single whole number of bootstrap samples, at least 2,
default |
fraction |
Single number in |
format, id, period, state, group |
Arguments describing the shape and
column names of |
seed |
Optional single seed, restored on exit and recorded on the result. |
... |
Further arguments passed to |
A simulab_sim edge list with one row per repetition and
transition: a leading iteration column followed by the columns
fit_tna() returns. The summary component holds one row per edge (per
group, when group is given) with the bootstrap mean, sd, and the
2.5% and 97.5% percentiles as lower and upper.
data <- simulate_sequences(n = 40, n_states = 3, chain_length = 12, seed = 1)
if (requireNamespace("tna", quietly = TRUE)) {
head(bootstrap_tna(data, model = "tna", repetitions = 5, seed = 1))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.