Joint Modelling {JointGLM}R Documentation

Model Checking

Description

Graphicals representation to help in model checking.

Usage

summplot.glm(glm, var = NULL, res = 'standard',
which = 1:5, ask = nb.fig < length(which) &&
 dev.interactive(), smooth = TRUE, ...)
obs.vs.model(glm.joint, plot.disp = FALSE, ...)
rstand.vs.linpred(glm, smooth = TRUE, ...)
res.vs.explvar(glm, var, res = 'standard', smooth = TRUE, ...)
absres.vs.fitted(glm, res = 'standard', smooth = TRUE, ...)
adjvar.vs.linpred(glm, smooth = TRUE, ...)
qqglm(glm, ...)

Arguments

glm Object of class glm.
glm.joint A list with two component. Each one are glm object corresponding to the mean and dispersion. The dispersion object is necessary only if plot.dispt is set to TRUE.
var Character. The name of the explanatory variable selected.
res Character. Should be standard, student of brut. The residual type considered.
which Numeric vector. Which plot must be produced.
ask Logical. If TRUE, user is asked before a new plot is produced.
smooth Logical. If TRUE - the default, a smoothing curve is plotted thanks to the lowess fucntion.
... Optional parameters to be passed to plot, abline and qqnorm functions.

Details

The function summplot.glm is a special function to compute all the checking plots. Checking plots implemented are :

  1. Observations functions of Fitted values
  2. Standardized Residuals functions of Linear predictor
  3. Residuals functions of an explanatory variable
  4. Absolute Residuals functions of Fitted values
  5. Adjusted Dependent Variable functions of Linear predictor
  6. QQ-plot of the residuals

Several conclusions can be established thanks to these plots. One can refer to McCullagh and Nelder, 1987 for interpretation.

Value

Return a (several) graphic window(s).

Author(s)

Mathieu Ribatet and Bertrand Iooss

References

McCullagh P. and Nelder J. A. (1987). Generalized Linear Models Second Edition. London: Chapman and Hall. ISBN 0-412-31760-5.

Examples

X <- rnorm(500, 5)
mu <- 2*X + 1
sigma2 <- exp(-X)
Y <- rnorm(500, mu, sqrt(sigma2))
data.frm <- data.frame(Y=Y, X=X)
ajust <- joint.glm('Y~X', 'd~X', data = data.frm)
layout(matrix(c(1,1,2,2,3,3,4,4,0,5,5,0),3,byrow=TRUE))
summplot.glm(ajust$glm.mean, var = 'X')

[Package JointGLM version 1.0-0 Index]