Description Usage Arguments Details Examples

Generate SAS DATA step code to predict the values of a bagged Multivariate Adaptive Regression Splines (MARS) model from the caret package.

1 | ```
bagEarth2sas(fit, name = "prediction", drop = TRUE)
``` |

`fit` |
a bagged MARS model trained by |

`name` |
the name of the variable in which to store the prediction |

`drop` |
whether to drop the variables for the individual trees |

This function supports regression and binary classification (when
`earth`

is called with `glm=list(family=binomial)`

.

This function supports only numeric variables, so any factors must first be
converted to numeric variables (as `train`

normally does).

In the case of binary classification, the predicted values are probabilities (not log-odds).

1 2 3 4 |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.