0

I have a glm model with multiple terms. I need to plot the roc and find the auc. I tried using roc() and multiclass.roc() but get Error in plot.new() : figure margins too large.

library(AER)
data("Affairs")
str(Affairs)
Affairs$affairs <- as.factor(Affairs$affairs)
m3 <- glm( affairs ~ gender+age+yearsmarried+religiousness+rating, family = 
binomial, data = Affairs)
honk <- roc(affairs ~ gender+age+yearsmarried+religiousness+rating, data = Affairs)
plot(honk)
honk$auc
kik_0626
  • 11
  • 4
  • If the figure margins are too large, you need to increase the size of your plotting widow. Are you using RStudio? Try the "zoom" button in the panel to pop up a new window. It's hard to know what's going on otherwise if we cannot actually run the code you provided. Make sure your code is [reproducible](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input data that can be used to test and verify possible solutions. – MrFlick Apr 12 '22 at 16:52

0 Answers0