earth (version 0.1-2)

summary.earth: Summary method for 'earth' objects

Description

Summary method for 'earth' objects.

Usage

## S3 method for class 'earth':
summary(object = stop("no 'object' arg"),
        digits = getOption("digits"), ...)

## S3 method for class 'summary.earth':
print(x = stop("no 'x' arg"), digits, ...)

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.
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.
...
Extra arguments are passed to format.earth.

Value

  • The value is the same as that returned by earth but with the following extra components:
  • stringString created by format.earth
  • digitsThe digits argument, passed on to print.summary.earth.

See Also

earth, format.earth

Examples

Run this code
a <- earth(Volume~ ., data = trees)
summary(a, digits = 2)

# yields:
#    Call:
#    earth(formula = Volume ~ ., data = trees)
#    
#    Expression:
#      23 
#      +  5.7 * pmax(0,  Girth -     13) 
#      -  2.9 * pmax(0,     13 -  Girth) 
#      + 0.72 * pmax(0, Height -     76) 
#    
#    Number of cases: 31
#    Selected 4 of 5 terms, and 2 of 2 predictors
#    Number of terms at each degree of interaction: 1 3 (additive model)
#    GCV: 11     RSS: 213     GRSq: 0.96     RSq: 0.97

Run the code above in your browser using DataLab