plot.RRglm: Plot diagnostics for a RRglm object

Description Usage Arguments Examples

View source: R/plot.R

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

1
2
3
4
5
6
7
8
## 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

1
2
3
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)

GLMMRR documentation built on Jan. 16, 2021, 5:28 p.m.

Related to plot.RRglm in GLMMRR...