CheckPredictionVariables | R Documentation |
CheckPredictionVariables
Verifies that newdata
is consistent with data used to used to fit a model.
The newdata
must contain a superset of the variables used to fit the model or an error results.
Variables that are factors in the training data are coerced to factors in newdata
.
If a factor variable in newdata
contains additional levels than the factor used for fitting,
a warning is given and instances with such additional levels are set to NA in the returned data.
The levels of the returned data frame are set to those of the fitted model.
CheckPredictionVariables(object, newdata)
object |
A model object for which prediction is desired. |
newdata |
A |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.