plot.cumres: Plot cumulative residuals from a 'cumres' object

Description Usage Arguments Author(s) See Also Examples

View source: R/plot.R

Description

plot displays the observed cumulative residual process with realizations under the null. 95% prediction bands

Usage

1
2
3
4
5
6
  ## S3 method for class 'cumres'
 plot(x, idx = 1:length(x$variable),
    col = c("grey"), ci = TRUE, col.ci = "darkblue",
    col.alpha = 0.3, lty.ci = 0, level = 0.95,
    legend = c("type1", "type2", "none"), xlab, ylab,
    vs = TRUE, ylim = NULL, title, ...)

Arguments

x

Object produced by the function cumres.

idx

vector of numbers (or variable names) indicating which processes from the x to plot.

col

Color of the sample processes. By setting this parameter to "none" or NULL no realizations will be drawn. The number of realizations is determined by the cumres-object.

ci

Type of prediction bands to plot. Defaults to none. Set to TRUE to obtain simultaneous prediction bands under the null (pointwise can be obtained by setting to "pointwise").

col.ci

Color of prediction band.

col.alpha

Degree of transparency (0-1) of the prediction bands.

lty.ci

Line type of prediction band.

level

The required prediction level.

legend

Type of legend where "type1" gives p-values of GoF-tests and "type2" gives usual type of legends.

xlab

Optional label of x-axis

ylab

Optional label of y-axis

vs

Label of predictor

ylim

Range of y axis

title

Main title

...

Additional arguments passed to the plot-routine.

Author(s)

Klaus K. Holst <kkho@biostat.ku.dk>

See Also

cumres

Examples

1
2
3
4
n <- 500; x <- abs(rnorm(n,sd=0.2))+0.01; y <- sqrt(x) + rnorm(n,sd=0.2)
l <- lm(y ~ x)
g <- cumres(l, R=500)
plot(g, idx=1, ci="sim", col=NULL, col.ci="purple", legend="type2")

Example output

Loading 'gof' version 0.9.1

gof documentation built on May 2, 2019, 5:52 p.m.