mellio_compare: Compare nested regression models as a Mellio Stats card

View source: R/bridge-extract-comparison.R

mellio_compareR Documentation

Compare nested regression models as a Mellio Stats card

Description

Builds a hierarchical-regression comparison payload from two or more nested model objects. Unlike mellio_payload(anova(m1, m2)), this keeps the original models available so Mellio can report model R^2, adjusted R^2, ⁠Delta R^2⁠, and the nested-model F-change.

Usage

mellio_compare(..., labels = NULL, .call = NULL)

Arguments

...

Nested model objects, usually lm objects ordered from the baseline model to the final model.

labels

Optional model labels. Defaults to "Model 1", "Model 2", and so on.

.call

Optional call string for provenance / display.

Value

A mellio_payload object.

See Also

Other R bridge: mellio_addin_send(), mellio_capture(), mellio_open(), mellio_payload(), mellio_to_json(), print.mellio_payload()

Examples

m1 <- lm(mpg ~ wt + hp, data = mtcars)
m2 <- lm(mpg ~ wt + hp + cyl, data = mtcars)
p <- mellio_compare(m1, m2)
p$type

mellio documentation built on Aug. 30, 2026, 1:06 a.m.