I'm following an analysis of German Credit data and I got an error which I'm failing to rectify because I already installed the ROCR package. Below is the code that uses the ROCR:
#load library
library(ROCR)
#score test data set
test$score <- predict(m,type='response',test)
pred <- prediction(test$score,test$good_bad)
perf <- performance(pred,"tpr","fpr")
plot(perf)
Now, after running pred
, I get the following error:
>pred <- prediction(test$score,test$Good_Bad)
Error: could not find function "prediction".
This also happens when I try to execute the following line:
>perf <- performance(pred,"tpr","fpr")
Error: could not find function "performance"