plot.joint {JointGLM}R Documentation

Model Checking

Description

Graphicals representation to help in model checking.

Usage

## S3 method for class 'joint':
plot(x, comp = "mean", var = NULL, res = 'standard',
which = 1:5, ask = nb.fig < length(which) && dev.interactive(), smooth =
TRUE, ...)
obs.vs.model(x.joint, plot.disp = FALSE, ...)
rstand.vs.linpred(x, smooth = TRUE, ...)
res.vs.explvar(x, var, res = 'standard', smooth = TRUE, ...)
absres.vs.fitted(x, res = 'standard', smooth = TRUE, ...)
adjvar.vs.linpred(x, smooth = TRUE, ...)
qqglm(x, ...)

Arguments

x,x.joint A fitted GLM/GAM object or a fitted joint model.
comp The component for the joint model. Must be one of "mean" or "disp".
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.
plot.disp Logical. Should the +/- standard deviation error bar be plottted around the point selected by the identify function.

Details

The function plot.joint 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 <- fitjoint("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))
plot(ajust, var = 'X')

[Package JointGLM version 1.0-3 Index]