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().
Value
An object of class tna, as tna::tna() returns: every verb of that
package applies to it, including centralities(), communities(),
cliques() and plot().
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.
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)
}
#> State Labels :
#>
#> profile_1, profile_2
#>
#> Transition Probability Matrix :
#>
#> profile_1 profile_2
#> profile_1 0.8151872 0.1848128
#> profile_2 0.1373717 0.8626283
#>
#> Initial Probabilities :
#>
#> profile_1 profile_2
#> 0.3675166 0.6324834
