list_g_functions: List g-function groups from a fitted earth model

View source: R/plot_results.R

list_g_functionsR Documentation

List g-function groups from a fitted earth model

Description

Returns a data frame describing each non-intercept g-function group from the model equation, including degree, factor count, graph dimensionality, and the number of terms. The g-function notation is {}^{f}g^{j}_{k} where f = number of factor variables (top-left), j = degree of interaction (top-right), k = position within the degree group (bottom-right).

Usage

list_g_functions(earth_result)

Arguments

earth_result

An object of class "earthUI_result" as returned by fit_earth().

Value

A data frame with columns:

index

Integer. Sequential index (1-based).

label

Character. Variable names in the group.

g_j

Integer. Degree of the g-function (top-right superscript).

g_k

Integer. Position within the degree (bottom-right subscript).

g_f

Integer. Number of factor variables (top-left superscript).

d

Integer. Graph dimensionality (degree minus factor count).

n_terms

Integer. Number of terms in the group.

Examples


result <- fit_earth(mtcars, "mpg", c("cyl", "disp", "hp", "wt"))
list_g_functions(result)


earthUI documentation built on March 26, 2026, 1:07 a.m.