plot: Plot an object of class Toc or Roc

plotR Documentation

Plot an object of class Toc or Roc

Description

Plot a Total Operating Characteristic (TOC) curve or a Relative Operating Characteristic (ROC) curve

Usage

## S4 method for signature 'Toc'
plot(x, labelThres = FALSE, modelLeg = "Model", digits = 3, 
nticks = 5, digitsL = 1, posL = NULL, offsetL = 0.5, ...)
   

## S4 method for signature 'Roc'
plot(x, labelThres = FALSE, modelLeg = "Model", digits = 3, 
nticks = 5, digitsL = 1, posL = NULL, offsetL = 0.5, ...)

Arguments

x

An object of class Toc or Roc

labelThres

logical, default to FALSE. If TRUE, thresholds are labeled in the TOC plot

modelLeg

a character string for labeling the model in the legend

digits

integer indicating the number of decimal places (round) or significant digits (signif) to be used for labeling the numeric axes. Negative values are allowed. See Details in the round function

nticks

number of tickmarcks to be drawn along the axes

digitsL

integer indicating the number of decimal places (round) or significant digits (signif) to be used for labeling the thresholds. Negative values are allowed. See Details in the round function

posL

a position specifier for the text labels. Values of 1, 2, 3 and 4, respectively indicate positions below, to the left of, above and to the right of the corresponding coordinates

offsetL

when posL is specified, this value gives the offset of the label from the corresponding coordinate in fractions of a character width

...

additional parameters to be passed to plot, axis or text

Value

a plot showing the TOC or the ROC curve

References

Pontius Jr., R.G., Kangpin, Si. 2014. The total operating characteristic to measure diagnostic ability for multiple thresholds. International Journal of Geographical Information Science 28 (3): 570-583. <doi:10.1080/13658816.2013.862623>

Pontius, G., Parmentier, B. 2014. Recommendations for using the Relative Operating Characteristic (ROC). Landscape Ecology 29 (3): 367-382. <doi:10.1007/s10980-013-9984-8>

See Also

TOC, ROC

Examples

index <- rast(system.file("external/Prob_Map2.rst", package = "TOC"))
boolean <- rast(system.file("external/Change_Map2b.rst", package = "TOC"))
mask <- rast(system.file("external/MASK4.rst", package = "TOC"))

## create and plot the TOC curve
tocd <- TOC(index, boolean, mask, nthres = 100)
plot(tocd, main = "TOC curve")

## create and plot the ROC curve
rocd <- ROC(index, boolean, mask, nthres = 100)
plot(rocd, main = "ROC curve")

## label the thresholds in the plot
tocd <- TOC(index, boolean, mask, nthres = 10)
plot(tocd, labelThres = TRUE, cex = 0.8, posL = 4)

TOC documentation built on Feb. 16, 2023, 7:10 p.m.