define Better
Arthritis$Better <- Arthritis$Improved > 'None'
main effects model for the binary response
arth.mod1 <- glm(Better ~ Age + Sex + Treatment , data=Arthritis, family='binomial')
Anova(arth.mod1)
## Analysis of Deviance Table (Type II tests)
##
## Response: Better
## LR Chisq Df Pr(>Chisq)
## Age 6.1587 1 0.0130764 *
## Sex 6.9829 1 0.0082293 **
## Treatment 12.1965 1 0.0004788 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
diagnostic plots: “regression quartet”
op <- par(mfrow=c(2,2))
plot(arth.mod1)
par(op)
influence plot
influencePlot(arth.mod1, main="Arthritis data: influencePlot")
## StudRes Hat CookD
## 1 1.922340 0.08968430 0.11275986
## 4 1.789163 0.08404862 0.08180053
## 15 -1.183430 0.14158260 0.04199003
## 16 -1.360860 0.09261481 0.03812094
## 39 -2.170769 0.03144317 0.06896768
IycgLS0tDQojJyB0aXRsZTogIkFydGhyaXRpcyBkYXRhOiBkaWFnbm9zdGljIHBsb3RzIg0KIycgYXV0aG9yOiAiTWljaGFlbCBGcmllbmRseSINCiMnIGRhdGU6ICJgciBmb3JtYXQoU3lzLkRhdGUoKSlgIg0KIycgb3V0cHV0Og0KIycgICBodG1sX2RvY3VtZW50Og0KIycgICAgIHRoZW1lOiByZWFkYWJsZQ0KIycgICAgIGNvZGVfZG93bmxvYWQ6IHRydWUNCiMnIC0tLQ0KDQojKyBlY2hvPUZBTFNFDQprbml0cjo6b3B0c19jaHVuayRzZXQoDQogIHdhcm5pbmcgPSBGQUxTRSwgICAjIGF2b2lkIHdhcm5pbmdzIGFuZCBtZXNzYWdlcyBpbiB0aGUgb3V0cHV0DQogIG1lc3NhZ2UgPSBGQUxTRQ0KKQ0KDQpsaWJyYXJ5KHZjZCkNCmxpYnJhcnkoY2FyKQ0KZGF0YShBcnRocml0aXMpDQoNCiMnICMjIGRlZmluZSBCZXR0ZXINCkFydGhyaXRpcyRCZXR0ZXIgPC0gQXJ0aHJpdGlzJ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