library(performance)
library(see)
# creating a model
model <- glm(vs ~ wt + mpg, data = mtcars, family = "binomial")
# doing what docs say
plot(binned_residuals(model)) + see::scale_color_pizza()
#> Warning: Probably bad model fit. Only about 50% of the residuals are inside the error bounds.
library(performance)
library(see)
# creating a model
model <- glm(vs ~ wt + mpg, data = mtcars, family = "binomial")
# doing what docs say
print(binned_residuals(model)) + see::scale_color_pizza()
#> Warning: Probably bad model fit. Only about 50% of the residuals are inside the error bounds.
#> Warning: Incompatible methods ("Ops.data.frame", "+.gg") for "+"
#> Error in print(binned_residuals(model)) + see::scale_color_pizza(): non-numeric argument to binary operator
The doc states:
But this does not work.
plot
Created on 2021-03-08 by the reprex package (v1.0.0)
print
Created on 2021-03-08 by the reprex package (v1.0.0)