summary.earth: Summary method for earth objects

View source: R/print.earth.R

summary.earthR Documentation

Summary method for earth objects

Description

Summary method for earth objects.

Usage

## S3 method for class 'earth'
summary(object = stop("no 'object' argument"),
        details = FALSE,  style = c("h", "pmax", "max", "C", "bf"),
        decomp = "anova", digits = getOption("digits"), fixed.point=TRUE,
        newdata = NULL, ...)

## S3 method for class 'summary.earth'
print(x = stop("no 'x' argument"),
        details = x$details,
        decomp = x$decomp, digits = x$digits, fixed.point = x$fixed.point,
        newdata = x$newdata, ...)

Arguments

object

An earth object. This is the only required argument for summary.earth.

x

A summary.earth object. This is the only required argument for print.summary.earth.

details

Default is FALSE. Use TRUE to print more information about earthglm models. But note that the displayed Standard Errors and statistics for the GLM coefficients are meaningless (because of the amount of preprocessing done by earth to select the regression terms).

style

Formatting style. One of
"h" (default) more compact
"pmax" for those who prefer it and for compatibility with old versions of earth
"max" is the same as "pmax" but prints max rather than pmax
"C" C style expression with zero based indexing
"bf" basis function format.

decomp

Specify how terms are ordered. Default is "anova". Use "none" to order the terms as created by the forward.pass. See format.earth for a full description.

digits

The number of significant digits.
For summary.earth, the default is getOption("digits").
For print.summary.earth, the default is the $digits component of object.

fixed.point

Method of printing numbers in matrices. Default is TRUE which prints like this (making it easier to compare coefficients):

        (Intercept)    15.029
        h(temp-58)      0.313
        h(234-ibt)     -0.046
        ...

whereas fixed.point=FALSE prints like this (which is more usual in R):

        (Intercept)   1.5e+01
        h(temp-58)    3.1e-01
        h(234-ibt)   -4.6e-02
        ...

Matrices with two or fewer rows are never printed with a fixed point.

newdata

Default NULL.
Else print R-Squared for the new data (and the returned object will have newrsq and newdata fields). Additionally, if a variance model is present print the interval coverage table for the new data.

...

Extra arguments are passed to format.earth.

Value

The value is the same as that returned by earth but with the following extra components.

strings

String(s) created by format.earth. For multiple response models, a vector of strings.

newrsq

Only if newdata was passed to summary.earth.

newdata

Only if newdata was passed to summary.earth.

digits
details
decomp
fixed.point

The corresponding arguments, passed on to print.summary.earth.

Note

The printed Estimated importance uses evimp with the nsubsets criterion. The most important predictor is printed first, and so on.

See Also

earth, evimp, format.earth

Examples

earth.mod <- earth(Volume~ ., data = trees)
summary(earth.mod, digits = 2)

earth documentation built on Oct. 6, 2024, 1:08 a.m.

Related to summary.earth in earth...