[R] Error with caret model
javed khan
j@vedbtk111 @end|ng |rom gm@||@com
Thu Dec 24 23:36:17 CET 2020
Greetings to everyone
I read online about this code:
importance=NULL
m= glm (......)
imp= rbind(importance, anova(m, type="2", test="LR"))$"LR Chisq")
but I am using caret:
model <- train(act_effort ~ ., data = tr,
method = "rpart",
tuneLength = 15,
metric = "RMSE",
trControl = ctrl)
And when I am using like the following,
importance=NULL
m= glm (......)
imp= rbind(importance, anova(model, type="2", test="LR"))$"LR Chisq")
It gives me the error:
Error in UseMethod("anova") :
no applicable method for 'anova' applied to an object of class
"c('train', 'train.formula')"
[[alternative HTML version deleted]]
More information about the R-help
mailing list