plot.devresid: Plot deviance residuals

Description Usage Arguments Details Note Author(s) See Also Examples

View source: R/plot.devresid.R

Description

Plot an image of deviance residuals for a space-time point process.

Usage

1
2
## S3 method for class 'devresid'
plot(x, ..., col.key = rev(heat.colors(100)), cutoffs = NULL)

Arguments

x

A “devresid” object.

...

Arguments for use with points.

col.key

A vector of colors in hexadecimal format.

cutoffs

A vector of cut points for assigning the colors in col.key to the residuals in X. cutoffs should be a vector of length one more than the length of col.key.

Details

cutoffs must be a vector of increasing values of the same length as col.key plus 1. cutoffs divides the residual values in x$residuals into a number of intervals equal to the number of colors in col.key. The colors are assigned to the intervals in order, e.g. the first color in col.key will be plotted in the bins defined by the spatial grid in x$grid that contains a residual that falls anywhere in the first interval (lower bound inclusive, upper bound exclusive).

Default col.key is a vector of 100 heat colors in reverse. Default cutoffs is a vector of 101 equally spaced points that range from the minimum residual in x$residuals, minus a very small number, to the maximum residual, plus a very small number.

Note

The default col.key and cutoffs may not be useful if the residuals are highly skewed. In this case, there should be more values in cutoffs where the residuals are most dense.

These are simply default plots for quick illustration of the residuals, and may or may not be useful for detailed analysis of the residuals.

Author(s)

Robert Clements

See Also

devresid, image

Examples

1
2
3
4
5
6
data(deviance)
plot(deviance)

hist(deviance$residuals)
cutoffs <- c(seq(-1.55, 2, length.out = 85), seq(2.01, 8.7, length.out = 16))
plot(deviance, cutoffs = cutoffs)

Example output

Loading required package: deldir
deldir 0.1-16
Loading required package: splancs
Loading required package: sp

Spatial Point Pattern Analysis Code in S-Plus
 
 Version 2 - Spatial and Space-Time analysis

Loading required package: cubature

stppResid documentation built on May 29, 2017, 3:48 p.m.