I would like to be able to generate a confidence interval from a model that I create with the package caret. This can be done using predict(model, data, interval = "confidence")
when the model is created with lm()
. However, when I try the same command with a model created with caret's train()
function, I get the following error:
Error in extractPrediction(list(object), unkX = newdata, unkOnly = TRUE, :
unused argument (interval = "confidence")
This is true even when I set method = "lm"
in the train
function. Does anyone know how to get a confidence interval from such an object? Preferably using predict
so the format is the same.
Thanks!
extractPrediction
-function named "interval". Since the inference model for resampling procedures is different than for the usual use oflm
, you might want to adjust your expectations.