get.nterms.per.degree {earth}R Documentation

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

data(ozone1)
a <- earth(O3 ~ ., data = ozone1, degree = 2)
get.nterms.per.degree(a)  # yields 1 6 7

[Package earth version 1.1-4 Index]