Usage
## S3 method for class 'earth':
predict(object = stop("no 'object' arg"), newdata = NULL,
type = c("link", "response", "earth", "class", "terms"),
interval = "none", level = .95,
thresh = .5, trace = FALSE, ...)
Arguments
object
An earth
object.
This is the only required argument. newdata
Make predictions using newdata
, which
can be a data frame, a matrix, or a vector with length equal to a multiple of the number of columns
of the original input matrix x
.
Note that this is more flexible than the predic
type
Type of prediction.
One of "link"
(default), "response"
, "earth"
, "class"
, or "terms"
.
See the Note below.
interval
Return prediction or confidence levels.
Default is "none"
.
Use interval="pint"
to get prediction intervals on new data.
Requires that the earth model was built with varmod.method
.
This argument gets passed
level
Confidence level for the interval
argument.
Default is .95
, meaning construct 95% confidence bands
(assume the residual variance is symmetrical and
calculate 2.5% and 97.5% levels).
thresh
Threshold, a value between 0 and 1 when predicting a probability.
Only applies when type="class"
.
Default is .5.
See the Note below.
trace
Default FALSE
. Set to TRUE
to see which data, subset, etc. predict.earth
is using.
...
Unused, but provided for generic/method consistency.