tol.contour: Plot tolerance contours

View source: R/tol.contour.R

tol.contourR Documentation

Plot tolerance contours

Description

Draw contours based on a p-value matrix.

Usage

tol.contour(pim, test = c("upper", "lower", "two-sided"), ...)

Arguments

pim

A pixel image of p-values, typically obtained from a call to tolerance, computed with respect to a test for elevated risk.

test

An optional character string giving the type of manipulation to be applied to the p-values, corresponding to a test for significantly elevated risk ("upper"; default); for reduced risk ("lower"); or for both ("two-sided").

...

Additional arguments to be passed to contour. Commonly used options include add (to superimpose the contours upon an existing plot); levels (to control the specific significance levels at which to delineate the p-values); and lty or lwd for aesthetics.

Details

Note that no checks on the numeric content of pim are made. The function assumes the pixel image of p-values in pim is supplied with respect to an upper-tailed test for elevated risk (this is exactly the way the p-value surface is returned when tolerance is used). This is important if one makes subsequent use of test, which manipulates the p-values to draw at desired significance levels.

Value

Opens a new graphics device and displays a contour plot if add = FALSE, otherwise adds the contours to the plot in the existing active graphics device.

Author(s)

T. M. Davies

Examples


# See ?tolerance


tilmandavies/sparr documentation built on July 8, 2024, 2:57 p.m.