get_group_tna: A transition network for each latent group class

View source: R/tna.R

get_group_tnaR Documentation

A transition network for each latent group class

Description

Builds one tna::tna() model per latent group class of a fitted transition model, collected into the group_tna object tna's grouped verbs expect. A class row with no expected outgoing moves keeps the fit's unestimated transition probabilities and raises latents_empty_transition_row.

Usage

get_group_tna(x, ...)

## S3 method for class 'multilpa_transitions'
get_group_tna(x, label = "Group class", ...)

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

## S3 method for class 'multilpa'
get_group_tna(x, label = "Group class", ...)

## S3 method for class 'multilpa_covariates'
get_group_tna(x, label = "Group class", ...)

Arguments

x

A fitted model from lta(), or a multilpa() / multilca() fit made with ⁠time =⁠, whose modal profile sequences are then used.

...

Passed to tna::tna() for each class.

label

What the classes are called in tna's output.

Value

An object of class group_tna, one tna model per latent class: centralities() returns one tidy table with a group column, compare() contrasts two classes, and plot() draws them together.

See Also

get_tna() for one network over the whole sample.

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_group_tna(moves)
}

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