ggplot.evmOpt: Diagnostic plots for an evm object

View source: R/ggplot.evm.R

ggplot.evmOptR Documentation

Diagnostic plots for an evm object

Description

Create and display diagnostic plots for an evm object. See plot.evmOpt for further details on what is being plotted.

Usage

## S3 method for class 'evmOpt'
ggplot(
  data,
  mapping,
  which = 1:4,
  main = rep(NULL, 4),
  xlab = rep(NULL, 4),
  nsim = 1000,
  alpha = 0.05,
  jitter.width = 0,
  jitter.height = 0,
  ptcol = "blue",
  span = 2/3,
  col = "light blue",
  fill = "orange",
  plot. = TRUE,
  ncol = 2,
  nrow = 2,
  ...,
  environment
)

Arguments

data

An object of class evm.

mapping, environment

ignored

which

Which plots to produce. Defaults to which=1:4.

main

Main titles. Should have length 4.

xlab

Labels for x-axes.

nsim

Number of simulated datasets to create to form tolerance regions.

alpha

Used to compute coverage of pointwise confidence intervals.

jitter.width, jitter.height

Used to control the amount of jittering of points in the plots of the residuals versus covariates (when covariates are in the model). Defaults to jitter.width=0, jitter.height = 0.

ptcol

Colour for points. Defaults to ptcol="blue".

span

Passed to the loess smoother and defaults to span=2/3. Sometimes this choice is poor: if the loess smoother looks wrong, try span=1.

col

Colour for lines. Defaults to col="light blue".

fill

Colour for confidence regions. Defaults to fill="orange"

plot.

Whether or not to display the output. Defaults to plot.=TRUE. If the display doesn't have the desired row and column layout, the user should specify plot.=FALSE, asign the output to an object, and use grid.arrange to display it.

ncol

The number of columns wanted in the resulting plot. Defaults to ncol=2. This argument is passed into grid.arrange.

nrow

The number of rows wanted in the resulting plot. Defaults to nrow=2. This argument is passed into grid.arrange.

...

Other arguments passed through to underlying plot functions.

Details

The function attempts to arrange the plots nicely. If the output isn't what was wanted, the function returns the graphs to the user as a list so that the user can use grid.arrange directly. Also, if you have one or more covariates in the model and the loess smoother looks wrong, try setting span=1.

See Also

plot.evmOpt


texmex documentation built on June 22, 2024, 12:26 p.m.