I would like to be able to generate a confidence interval from the model that I am creating using the package caret. This can be done using predict(model, data, interval = "confidence")when the model is created using lm(). However, when I try to use the same command with a model created using a function train(), I get the following error:
Error in extractPrediction(list(object), unkX = newdata, unkOnly = TRUE, :
unused argument (interval = "confidence")
This is true even if I set method = "lm"to a function train. Does anyone know how to get the confidence interval from such an object? It is preferable to use the predictsame format.
Thank!
source
share