QQline: Add a theoretical QQ-line in a plot

View source: R/QQline.R

QQlineR Documentation

Add a theoretical QQ-line in a plot

Description

Adds a QQ-line for the values in x in the current plot.

Usage

QQline(x, ...)

Arguments

x

The sample for QQ-line

...

Graphical parameters

Value

The intercept and the slope of the QQ-line are returned

References

Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) The New S Language. Wadsworth & Brooks/Cole.

Examples

library(robcbi)
data(Finney)
Vol  <- Finney$Vol; Rate <- Finney$Rate; Resp <- Finney$Resp
lVol <-log(Vol); lRate <- log(Rate)
z.cub <- glm(Resp~lVol+lRate,family=binomial,method="cubinf", ufact=3.2)
x    <- residuals(z.cub, type="deviance")
## Not run: 
qqnorm(x, ylab = "Deviance Residuals")
QQline(x, lty = 2)

## End(Not run)

robcbi documentation built on Aug. 22, 2023, 1:06 a.m.