report: Everything about a fit, in one call

View source: R/report.R

reportR Documentation

Everything about a fit, in one call

Description

Prints the estimates, then the classification diagnostics, then draws every plot the fit supports. A first look, not a substitute for the verbs: each section is what summary(), diagnostics() and plot() return, and the tables are reachable from those rather than from here.

Usage

report(
  x,
  data = NULL,
  plots = TRUE,
  by = c("profile", "overall"),
  rows = 10L,
  ...
)

Arguments

x

A fitted model of this package.

data

Optional. The data the model was fitted to; a fit carries the columns it was built from.

plots

TRUE, the default, draws the plots. FALSE prints only.

by

Passed to diagnostics(), and from there to the bivariate residuals: "profile", the default, assesses each profile separately, "overall" pools them.

rows

How many rows of each of the summary's tables to print, passed to print(summary(x)). A first look at a fit with thousands of observations would otherwise be mostly posteriors.

...

Nothing further is accepted. An argument this function cannot forward raises an error of class latents_bad_argument naming it, before anything has been printed, rather than being dropped.

Value

The fitted model, invisibly. Called for the printing and drawing.

What it prints

summary(), which is every table the fit can produce, then descriptives(), then the condensed reading of diagnostics(), then every plot view the fit supports. Each section is what that verb returns, and the tables are reached from get_results() rather than from here.

See Also

summary(), diagnostics(), descriptives(), plot_views().

Examples

fit <- multilpa(
  course_engagement,
  vars = c("browse", "lectures", "forum_read", "forum_post", "attendance"),
  id = "student", n_profiles = 2, n_group_classes = 2, n_starts = 4,
  seed = 1
)
report(fit, plots = FALSE)

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