smoothdist | R Documentation |
A function to generate a smoothed density function of observed probability of presence
smoothdist(pred, res, smoothing_df = 4)
pred |
Numeric. Vector of model predictions for combined occurrence and background points. |
res |
Numeric. Vector expected presence and background values (referred in the function as 'res' = 'response variable'); 0 = expected background, 1 = expected presence. |
smoothing_df |
Numeric. Degrees of freedom for a natural cubic spline fitted to model predictions at combined occurrence and background locations. |
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).
It is normally called by the function POCplot.
The original script used a default smoothing degrees of freedom (smoothing_df) of 6, but trials during development of this implementation suggest that a better default value is 4.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.