latents-as-data-frame: Convert latents results to a data frame

as.data.frame.multilpaR Documentation

Convert latents results to a data frame

Description

as.data.frame() returns the primary table of a latents result: the measurement parameters of a fitted model, the candidates of an enumeration, the test of a bootstrap, and so on. It is the same table as get_results(x); get_results() with ⁠what =⁠ returns the others.

Usage

## S3 method for class 'multilpa'
as.data.frame(x, row.names = NULL, optional = FALSE, ...)

## S3 method for class 'multilpa_enumeration'
as.data.frame(x, row.names = NULL, optional = FALSE, ...)

## S3 method for class 'multilpa_start'
as.data.frame(x, row.names = NULL, optional = FALSE, ...)

## S3 method for class 'multilpa_covariates'
as.data.frame(x, row.names = NULL, optional = FALSE, ...)

## S3 method for class 'summary_multilpa_additive'
as.data.frame(x, row.names = NULL, optional = FALSE, ...)

## S3 method for class 'summary_multilpa_covariates'
as.data.frame(x, row.names = NULL, optional = FALSE, ...)

## S3 method for class 'summary_multilpa_enumeration'
as.data.frame(x, row.names = NULL, optional = FALSE, ...)

## S3 method for class 'multilpa_bootstrap_lrt'
as.data.frame(x, row.names = NULL, optional = FALSE, ...)

## S3 method for class 'summary_multilpa_bootstrap_lrt'
as.data.frame(x, row.names = NULL, optional = FALSE, ...)

## S3 method for class 'latents_table'
as.data.frame(x, row.names = NULL, optional = FALSE, ...)

## S3 method for class 'summary_multilpa'
as.data.frame(x, row.names = NULL, optional = FALSE, ...)

## S3 method for class 'multilpa_transitions'
as.data.frame(x, row.names = NULL, optional = FALSE, ...)

## S3 method for class 'summary_multilpa_transitions'
as.data.frame(x, row.names = NULL, optional = FALSE, ...)

Arguments

x

An object returned by a latents function, or the summary() of one.

row.names

Passed to data.frame(); NULL gives default row names.

optional

Ignored; present for compatibility with as.data.frame().

...

Must be empty. An argument here raises latents_bad_argument naming it, rather than being dropped.

Value

A base data.frame, one row per parameter, candidate or test depending on the object.

See Also

get_results(), latents-print, latents-summary.

Examples

fit <- multilpa(course_engagement, c("browse", "lectures", "forum_read"),
                "student", n_profiles = 2, n_group_classes = 2,
                n_starts = 2, seed = 1)
head(as.data.frame(fit))

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