get.nterms.per.degree {earth} | R Documentation |
Get the number of terms at each degree of interaction in an ‘earth’ object.
get.nterms.per.degree(object, which.terms = object$selected.terms)
object |
An earth object.
|
which.terms |
Typically the selected.terms component of the earth object.
|
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.
earth
,
get.nused.preds.per.subset
,
data(ozone1) a <- earth(O3 ~ ., data = ozone1, degree = 2) get.nterms.per.degree(a) # yields 1 6 7