I am to test the normality of a set of residuals in a model
glm(Failure ~ Lead ,data=Exercise2, family="binomial")
summary(glm(Failure ~ Lead ,data=Exercise2, family="binomial"))
hist(summary(glm(Failure ~ Lead ,data=Exercise2, family="binomial"))$resi)
I have added the is.numeric to confirm my data is numeric
is.numeric(Exercise2$Lead)
is.numeric(Exercise2$Failure)
The output i am getting is below
Error in hist.default(summary(glm(Failure ~ Lead, data = Exercise2, family = "binomial"))$resi) : 'x' must be numeric
> is.numeric(Exercise2$Lead)
[1] TRUE
> is.numeric(Exercise2$Failure)
[1] TRUE
Can anyone advise why i am getting an error that data must be numeric when the data is numeric ?