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

Description Usage Arguments Author(s) Examples

View source: R/plot.R

Description

plot displays the observed cumulative residual process with realizations under the null.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## S3 method for class 'cumres'
plot(
  x,
  idx = seq_along(x$W),
  col = "purple",
  col.alpha = 0.3,
  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.

col.alpha

Transparency-level of plotted sample processes

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

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, legend="type2")

gof documentation built on March 16, 2020, 1:07 a.m.