as_tna_model: Convert a tidy simulab TNA result to a native tna model

View source: R/tna.R

as_tna_modelR Documentation

Convert a tidy simulab TNA result to a native tna model

Description

Convert a tidy simulab TNA result to a native tna model

Usage

as_tna_model(x, group = NULL)

Arguments

x

A result from fit_tna() or simulate_group_tna().

group

Optional group name for a grouped model. When omitted, the complete native grouped model is returned.

Value

A native tna or group_tna model object. For a compare_tna_models() result the stored models are returned as a list named by model type instead.

Examples

data <- simulate_sequences(n = 40, n_states = 3, chain_length = 12, seed = 1)
if (requireNamespace("tna", quietly = TRUE)) {
  model <- as_tna_model(fit_tna(data, model = "tna"))
  class(model)
}

simulab documentation built on Oct. 15, 2026, 5:08 p.m.