respthresh: Binary Threshold for Continuous Fitted Response

respthreshR Documentation

Binary Threshold for Continuous Fitted Response

Description

Species distribution models (SDM) often use methods that give continuous fitted responses for the probability of species occurrence. Some users want to find a threshold that splits these continuous responses to binary outcomes of presence and absence (Allouche, Tsoar & Cadmon 2006). This function finds a threshold that maximizes the explained deviance and gives as true approximation of the original continuous response as possible.

Usage

respthresh(object)

Arguments

object

Fitted glm or gam object. The function was developed for binary observations responses fitted with binomial error distribution, but it may process other types of models with unspecified and untested results: proceed at your own risk.

Details

The function evaluates the deviance of the original continuous model by setting a threshold at each fitted value and evaluating the deviance explained with this threshold. The threshold is inclusive: values at or above the threshold are regarded as being hits. The deviance profile is usually jagged, and the method is sensitive to single data points, and can give disjunct regions of nearly equally good threshold points. Function plot will display the deviance profile, and summary lists all threshold that are nearly as good as the best point using Chi-square distribution with 1 degree of freedom at p=0.95 as the criterion.

The binary model has two values or average responses below and at or above the threshold, but these values are not usually 0 and 1. However, they are the values that maximize the explained deviance of a two-value model.

The summary also gives a Deviance table showing the original Null deviance, the original model deviance, and between these the residual deviance with the binary threshold, and the differences of these deviances in the second model. The result object can also be accessed with coef that returns the threshold, deviance that returns the residual deviance, and fitted that returns the fitted two values for each original observation.

Value

The function returns an object of class "respthresh" with following elements:

  • coefficients: optimal splitting threshold of fitted values.

  • expl.deviance: explained deviance

  • deviance: residual deviance at threshold.

  • cutoff, devprofile: sorted possible thresholds (i.e., estimated fitted values) and associated explained deviances.

  • formula, null.deviance, orig.deviance: formula, null deviance and deviance of the input model.

  • values: fitted values below and above threshold.

  • fitted: fitted values for each observation.

References

Allouche, O., Tsoar, A. & Kadmon, R. (2006) Assessing the accurraccy of species distribution models: prevelance, kappa and the true skill statistic (TSS). Journal of Applied Ecology 43, 1223–1232.


jarioksa/natto documentation built on March 28, 2024, 12:45 a.m.