Description Usage Arguments Examples
This function emulates some of the output returned by proc_genmod in SAS. It is simply a wrapper for a handful of diagnostics, organized in a slightly convenient way. This function does not fit any actual models, and thus must be passed a fitted object of class 'glm'
1 | proc_genmod(fit, scale = "pearson")
|
fit |
A fitting 'glm' or 'glm.nb' object |
scale |
Matching SAS argument, uses either pearson or deviance for estimation of dispersion parameter, takes either "pearson" or "deviance" |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | library(MASS)
## Examples match course notes (4.5-4.7)
data(ACHD)
fit1 <- glm(Mort ~ Age_Gp, family = poisson, offset = Log_Pop, data = ACHD)
fit2 <- glm.nb(Mort ~ Age_Gp + offset(Log_Pop), data = ACHD)
fit3 <- glm(cbind(Mort, Pop-Mort) ~ Age_Gp,
family = binomial(link = "log"), data = ACHD)
fit4 <- glm(cbind(Mort, Pop-Mort) ~ Age_Gp,
family = binomial(link = "logit"), data = ACHD)
fit5 <- glm(Log_Mort ~ Age_Gp, family = gaussian,
offset = Log_Pop, data = ACHD)
proc_genmod(fit1)
proc_genmod(fit2)
proc_genmod(fit3)
proc_genmod(fit4)
proc_genmod(fit5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.