I have the following code:
model <- as.formula("y~z+x2+x4+x5+x6+x10+x11") set.seed(12345) suppressMessages(library(caret)) train.control <- trainControl(method="repeatedcv", number=10, repeats=3) cv <- train(model,data=df2, method="glm", trControl=train.control)
cat("RMSE =",cv$results$RMSE,"\n") cat("Rsquared =",cv$results$Rsquared,"\n") cat("MAE =",cv$results$MAE,"\n")
The following statements result in NULL (each one)
cv$varImp cv$aic cv$deviance
When I see something listed in str(cv) am I to assume it can be available?
varImp, aic and deviance are included in the list.
The package documentation was sparse on this topic.