calibplot: Make a smoothed calibration plot

View source: R/pocplot.R

calibplotR Documentation

Make a smoothed calibration plot

Description

Make a smoothed calibration plot for a presence-only model using the method by Phillips and Elith

Usage

calibplot(
  pred,
  negrug,
  posrug,
  ideal,
  ylim = c(0, 1),
  xlim = c(0, 1),
  capuci = TRUE,
  xlabel = "Predicted probability of presence",
  ylabel = "Probability of presence",
  filename = NULL,
  title = "Calibration plot"
)

Arguments

pred

Data frame. Predicted probability of presence at occurrence and background locations

negrug

Numeric. Model prediction of presence at background points.

posrug

Numeric. Model prediction of presence at occurrence points.

ideal

Function.

ylim

Numeric. Two-element vector giving the x-axis for the plot; default is c(0, 1).

xlim

Numeric. Two-element vector giving the y-axis for the plot; default is c(0, 1).

capuci

Logical. Should the upper confidence limit of the smoothed probability of presence by clamped to 1?

xlabel

Character. Label to be applied to the x-axis.

ylabel

Character. Label to be applied to the y-axis.

filename

Character. Full path to the file into which the graph will be plotted. Default of NULL plots to the standard graphics device.

title

Character. Title for the plot. Default is a generic "Calibration plot".

Details

This is an adaptation of code published by Phillips and Elith (2010. POC plots: calibrating species distribution models with presence-only data. Ecology 91:2476–2484).

Although it is possible to call this function with user-generated parameter values, it is ideally designed to be called by the function POCplot.

This implementation uses ggplot2 to render the plot.

Value

A ggplot2 object


peterbat1/fitMaxnet documentation built on Sept. 17, 2024, 10:50 p.m.