## S3 method for class 'earth':
predict(object, newdata, \dots, type=c("response", "terms"))
Arguments
object
An earth object.
This is the only required argument.
newdata
Make predictions using the newdata.
Can be a dataframe, a matrix, or a vector with the same length as a row of the input matrix x.
Default is NULL, meaning use object's fitted values.
...
Unused, but provided for generic/method consistency.
type
Type of prediction. One of:
"response" (default)
"terms" return a response suitable for termplot. Only
the additive terms are returned.
Value
If type="response", a vector of predicted values.
If type="terms", a matrix with each column showing the contribution of a predictor.