plot.RRglm {GLMMRR} | R Documentation |
Plot diagnostics for a RRglm object
Description
Six plots (selectable by which
) are currently available: (1) a plot of estimated population prevalence per RR model,
(2) a plot of estimated population prevalence per protection level,
(3) a plot of ungrouped residuals against fitted response probability,
(4) a plot of grouped (on covariates) residuals against fitted response probability,
(5) a plot of grouped Hosmer-Lemeshow residuals against fitted response probability,
and (6) a Normal Q-Q plot of grouped (on covariates) residuals. By default, plots 1, 3, 4 and 6 are provided.
Usage
## S3 method for class 'RRglm'
plot(
x,
which = c(1, 3, 4, 6),
type = c("deviance", "pearson"),
ngroups = 10,
...
)
Arguments
x |
an object of class RRglm. |
which |
if a subset of the plots is required, specify a subset of the numbers 1:6 (default: 1, 3, 4, 6). |
type |
the type of residuals which should be used to be used for plots 3, 4 and 6. The alternatives are: "deviance" (default) and "pearson". |
ngroups |
the number of groups to compute the Hosmer-Lemeshow residuals for (default: 10). |
... |
further arguments passed to or from other methods. |
Examples
out <- RRglm(response ~ Gender + RR + pp + age, link="RRlink.logit", RRmodel=RRmodel,
p1=RRp1, p2=RRp2, data=Plagiarism, etastart=rep(0.01, nrow(Plagiarism)))
plot(out, which = 1:6, type = "deviance", ngroups = 50)