Returns predictions for new data from a fitted ares MARS model.
For bagged fits (n.boot > 0), returns the mean across the central
fit and the bootstrap replicates; with se.fit = TRUE, the per-row
bag standard deviation is attached as an "sd" attribute. For
gaussian fits built with a residual variance model
(varmod = "const" or "lm"), interval = "pint" returns
prediction intervals.
Arguments
- object
An object of class
"ares".- newdata
A numeric matrix or data frame of new predictors.
NULL(default) returnsobject$fitted.values.- type
Prediction scale.
"response"(default): probabilities for binomial, response-scale means for poisson and gamma, fitted values for gaussian."link": the linear predictor. Coincides with"response"for gaussian fits.
- se.fit
If
TRUEand the fit was built withn.boot > 0, the returned vector carries an"sd"attribute holding the per-row bag standard deviation. DefaultFALSE.- interval
Type of interval to return.
"none"(default): return point predictions only."pint": return a matrix with columnsc("fit", "lwr", "upr")using the variance model stored at fit time. Requiresfamily = "gaussian"andvarmod = "const"or"lm"; errors otherwise.
- level
Confidence level for prediction intervals when
interval = "pint". Default0.95.- ...
Currently unused.