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

2
  • If you are using roc() from the pROC package then the argument should be a logical ie TRUE or FALSE. Refer to the documentation for more details Commented Jul 23, 2018 at 17:34
  • What are PV and MI even supposed to do? Have you had a look at ?roc? Commented Jul 23, 2018 at 19:20

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.