Draw contours based on a p-value matrix.

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.

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.

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.

Author

T. M. Davies

Examples


# See ?tolerance