data(etitanic)
earth.mod <- earth(pclass ~ ., data=etitanic, glm=list(family=binomial))
head(resid(earth.mod, warn=FALSE)) # earth residuals, a column for each response
head(resid(earth.mod, type="response")) # GLM response resids, a column for each response
Run the code above in your browser using DataLab