earth (version 0.1-2)

get.nterms.per.degree: Number of terms at each degree of interaction in an 'earth' object

Description

Get the number of terms at each degree of interaction in an earth object.

Usage

get.nterms.per.degree(object, which.terms = object$selected.terms)

Arguments

object
An earth object.
which.terms
Typically the selected.terms component of the earth object.

Value

  • A vector showing the number of terms at each degree of interaction in the model specified by which.terms. The first entry is the intercept entry, and is always 1 because there is always one intercept. The second entry is the number of additive terms, and so on.

See Also

earth, get.nused.preds.per.subset,

Examples

Run this code
data(ozone1)
a <- earth(O3 ~ ., data = ozone1, degree = 2)
get.nterms.per.degree(a)  # yields 1 5 5

Run the code above in your browser using DataCamp Workspace