| simulate_sequence_batches | R Documentation |
Calls simulate_sequences() repetitions times and stacks the results, so
each dataset is drawn from its own transition system rather than from a
shared one.
simulate_sequence_batches(repetitions = 1L, ..., seed = NULL)
repetitions |
Number of datasets. A single positive whole number,
defaulting to |
... |
Arguments passed to |
seed |
Optional base seed. A single number, or |
A simulab_sim base data.frame in long form, one row per dataset,
sequence and position, with the column dataset followed by the columns
simulate_sequences() returns (id, period and state). Components:
transitions, the generating transition probabilities, one row per dataset
and from/to pair with columns dataset, from, to and probability;
and initial_probabilities, one row per dataset and state with columns
dataset, state and probability.
result <- simulate_sequence_batches(
repetitions = 3, n = 20, n_states = 3, chain_length = 10, seed = 1
)
head(result)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.