predict.cmaRs {cmaRs}R Documentation

A prediction function for a new data set for prediction purpose

Description

This function allows you to obtain the predicted values of a CMARS model.

Usage

## S3 method for class 'cmaRs'
predict(object, new = NULL, ...)

Arguments

object

A cmaRs object which is obtained by prediction.

new

The data for which the fitted values will be constructed.

...

Additional parameters affecting the predictions.

Value

y The predicted values.

Examples

## Not run: 
# Without \code{MOSEK}, the example code is not executable.
# For installation of Mosek, plese see the documentation of 'Rmosek'.
data("trees", package = "earth")
model.prediction <- cmaRs(Volume ~ ., degree = 5, nk = 20, data = trees)
predict.cmaRs(model.prediction, data = trees)

## End(Not run)

[Package cmaRs version 0.1.3 Index]