0

I am trying to get an AUC plot for a regression model I created in R and for some reason I get the following error "Error in if (plot) plot.roc(roc, ...) : argument is not interpretable as logical"

This is my code:

glm.fit <- glm(TARGET ~ NAME_CONTRACT_TYPE, data = application_train, family = binomial)
model_predtraining<-predict(glm.fit,application_train,type = 'response')
roc(model_predtraining,application_train$TARGET,main='ROC Training',plot = 'ROC',PV = FALSE,MI = FALSE)

it seems the model is created and predictions are calculated fine,its probably a mistake I made in the last line of code. I saw a few posts related to this error but they are not in the context of the roc function and I don't really understand the explanation. Error in if/while (condition) : argument is not interpretable as logical

Any help will be highly appriciated

idf4floor
  • 73
  • 1
  • 11
  • If you are using `roc()` from the `pROC` package then the argument should be a logical ie `TRUE` or `FALSE`. Refer to the [documentation](https://cran.r-project.org/web/packages/pROC/pROC.pdf) for more details – see24 Jul 23 '18 at 17:34
  • What are `PV` and `MI` even supposed to do? Have you had a look at [`?roc`](https://www.rdocumentation.org/packages/pROC/topics/roc)? – Calimo Jul 23 '18 at 19:20

0 Answers0