get_tna: A transition network for the whole sample

View source: R/tna.R

get_tnaR Documentation

A transition network for the whole sample

Description

Builds one tna::tna() model from a fitted transition model, aggregated over every latent group class.

Usage

get_tna(x, ...)

## S3 method for class 'multilpa_transitions'
get_tna(x, ...)

## S3 method for class 'multilpa_lta'
get_tna(x, ...)

## S3 method for class 'multilpa'
get_tna(x, ...)

## S3 method for class 'multilpa_covariates'
get_tna(x, ...)

Arguments

x

A fitted model from lta().

...

Passed to tna::tna().

Details

The aggregate is formed from the expected transition counts, summed across classes and then normalised, rather than by averaging the class transition matrices. The two differ: averaging weights each class by how probable it is, and summing counts weights it by how much transition mass it actually contributes, which is what a marginal transition probability means. A class holding a tenth of the students but a fifth of the observed moves counts for the latter. If a profile has no expected outgoing moves in any class, its transition row has no count-based estimate; the network uses the fitted class rows averaged by class probability and warns that the row is unestimated. It never interprets absent moves as a certain self-transition.

A general lta() fit – with occasion-varying or covariate-dependent transitions, a second order, movers and stayers, or ordinal, count or weighted data – has no single transition matrix, and is refused with latents_unsupported_tna; its transitions are in get_results(x, "transitions").

For a multilpa() or multilca() fit made with ⁠time =⁠, there is no estimated transition matrix: the network is built by tna::tna() from each group's sequence of modal profiles in time order, the observed transitions between the profiles the observations were assigned to. get_group_tna() splits those sequences by each group's modal group class. A fit made without time has no order and is refused.

Value

An object of class tna, as tna::tna() returns: every verb of that package applies to it, including centralities(), communities(), cliques() and plot().

See Also

get_group_tna() for one network per latent class.

Examples

if (requireNamespace("tna", quietly = TRUE)) {
  activity <- c("browse", "lectures", "forum_read")
  moves <- lta(course_engagement, vars = activity, id = "student",
                           time = "sequence", n_profiles = 2,
                           n_group_classes = 2, n_starts = 2, seed = 1)
  get_tna(moves)
}

latents documentation built on Oct. 16, 2026, 5:09 p.m.