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.16 1 0.01308 *
## Sex 6.98 1 0.00823 **
## Treatment 12.20 1 0.00048 ***
## ---
## 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.92 0.0897 0.1128
## 4 1.79 0.0840 0.0818
## 15 -1.18 0.1416 0.0420
## 16 -1.36 0.0926 0.0381
## 39 -2.17 0.0314 0.0690
IycgLS0tDQojJyB0aXRsZTogIkFydGhyaXRpcyBkYXRhOiBkaWFnbm9zdGljIHBsb3RzIg0KIycgYXV0aG9yOiAiTWljaGFlbCBGcmllbmRseSINCiMnIGRhdGU6ICJgciBmb3JtYXQoU3lzLkRhdGUoKSlgIg0KIycgb3V0cHV0Og0KIycgICBodG1sX2RvY3VtZW50Og0KIycgICAgIHRoZW1lOiByZWFkYWJsZQ0KIycgICAgIGNvZGVfZG93bmxvYWQ6IHRydWUNCiMnIC0tLQ0KDQojKyBlY2hvPUZBTFNFDQprbml0cjo6b3B0c19jaHVuayRzZXQoDQogIHdhcm5pbmcgPSBGQUxTRSwgICAjIGF2b2lkIHdhcm5pbmdzIGFuZCBtZXNzYWdlcyBpbiB0aGUgb3V0cHV0DQogIG1lc3NhZ2UgPSBGQUxTRQ0KKQ0KDQpsaWJyYXJ5KHZjZCkNCmxpYnJhcnkoY2FyKQ0KZGF0YShBcnRocml0aXMpDQoNCiMnICMjIGRlZmluZSBCZXR0ZXINCkFydGhyaXRpcyRCZXR0ZXIgPC0gQXJ0aHJpdGlzJEltcHJvdmVkID4gJ05vbmUn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