reliability: Assess Model Reliability

View source: R/reliability.R

reliabilityR Documentation

Assess Model Reliability

Description

Performs reliability analysis and outputs a concise summary of key metrics. The results can also be visualized.

Usage

reliability(x, ...)

## S3 method for class 'tna'
reliability(
  x,
  types = NULL,
  split = 0.5,
  iter = 1000,
  scaling = "none",
  actor = NULL,
  ...
)

Arguments

x

A tna object. Grouped models with scaled edge weights, and their networks, are not resampled (an error of class tna_error_scaling).

...

Ignored.

types

A character vector giving the model types to fit. The default NULL uses the type of x. For every type, the transitions are counted from the sequence data of x as that type defines them, with the parameters (params) and scaling of x. See build_model() for the available types.

split

A numeric value between 0 and 1 specifying the proportion of data for the split. The default is 0.5 for an even split.

iter

An integer specifying number of iterations (splits). The default is 1000.

scaling

A character string naming the scaling applied to the weights of the two halves before they are compared. The default is "none". See compare() for the options.

actor

An optional actor identifier for sequences nested in actors: a character string naming a non-sequence column of the data the model was built from, or a vector with one identifier per sequence. When given, the actors are split, so that all sequences of an actor fall in the same half, and split is the proportion of actors. The default NULL splits single sequences.

Value

A tna_reliability object, which is a list with two tibbles:

  • metrics: One row per split and comparison metric, with the columns category, metric, and value (and model_type when several types are given).

  • summary: One row per metric with the mean, sd, median, min, max, and quartiles (q25, q75) of the metric over the splits.

summary.tna_reliability() returns all metrics with their category as a tidy table.

See Also

Validation functions bootstrap(), deprune(), estimate_cs(), markov_order(), permutation_test(), permutation_test.group_tna(), plot.group_tna_bootstrap(), plot.group_tna_permutation(), plot.group_tna_stability(), plot.tna_bootstrap(), plot.tna_markov_order(), plot.tna_permutation(), plot.tna_reliability(), plot.tna_stability(), print.group_tna_bootstrap(), print.group_tna_permutation(), print.group_tna_stability(), print.summary.group_tna_bootstrap(), print.summary.tna_bootstrap(), print.summary.tna_markov_order(), print.tna_bootstrap(), print.tna_markov_order(), print.tna_permutation(), print.tna_reliability(), print.tna_stability(), prune(), pruning_details(), reprune(), summary.group_tna_bootstrap(), summary.tna_bootstrap(), summary.tna_markov_order(), summary.tna_permutation(), summary.tna_reliability(), summary.tna_stability()

Examples

# Small number of iterations for CRAN
model <- tna(engagement)
rel <- reliability(model, iter = 20)


tna documentation built on Nov. 17, 2026, 1:06 a.m.