Draws a transition system per replication, simulates sequences from it, fits
each estimator in models, and scores the fitted edges against the
generating probabilities. Fitted weights are row-normalized before the
comparison, so estimators on different weight scales are all read as
transition probabilities.
Arguments
- repetitions
Number of simulation replications. A single positive whole number, defaulting to
100.- n
Number of sequences per replication. A single whole number of at least 2, defaulting to
200.- chain_length
Sequence length. A single whole number of at least 2, defaulting to
25.- n_states
Number of states. A single whole number of at least 2, defaulting to
6.- models
TNA estimators to evaluate. A character vector of at least one of
"tna","ftna","ctna"and"atna", all four by default.- concentration, diagonal_concentration
Transition-system parameters passed to
generate_transition_system(), defaulting to1and0.- missing_tail
Trailing missing positions passed to
simulate_sequences(), defaulting toc(0L, 5L).- threshold
Absolute weight threshold above which an edge counts as present, in both the agreement and the recovery metrics. A single non-negative number, defaulting to
0.- seed
Optional base seed. A single number, or
NULL(the default). Replicationidraws its transition system withseed + i - 1and its sequences with that offset plus100000.- ...
Arguments passed to
fit_tna().
Value
A simulab_sim base data.frame with one row per replication and
model, holding iteration, model, the compare_networks() agreement
metrics and the evaluate_edge_recovery() summary. Components: truth,
the generating probabilities with columns iteration, from, to and
weight; and estimated_edges, the row-normalized fitted edges with
columns iteration, model, from, to and weight.
Examples
if (requireNamespace("tna", quietly = TRUE)) {
evaluate_tna_estimation(
repetitions = 2, n = 30, chain_length = 10, n_states = 3,
models = "tna", seed = 1
)
}