data(hcrabs)
attach(hcrabs)
y <- ifelse(num.satellites>0,1,0)
bnfit <- glm(y~color+spine+width+weight,family=binomial)
ypred <- bnfit$fitted.values
resid<-vresidual(y,ypred,family="binomial")
summary(resid)
head(resid)
Run the code above in your browser using DataLab