calcStability: calculate stability based on predicted and measured...

View source: R/calcStability.R

calcStabilityR Documentation

calculate stability based on predicted and measured distances.

Description

This function calculates the stability of a site by comparing the predicted distance and the measured distance. The algorithm is simple and straightforward: if the measured distance is greater than the predicted distance, the stability is negative, and if the measured distance is less than the predicted distance, the stability is positive. The stability value is normalized to be between -1 and 1, where -1 indicates the least stable (measured distance is much greater than predicted) and 1 indicates the most stable (measured distance is much less than predicted).

Usage

calcStability(predicted.dist, measured.dist)

Arguments

predicted.dist

The predicted distance (shall be in range 0~1)

measured.dist

The measured distance (shall be in range 0~1)

Value

a numeric value of stability for the site in range [-1, 1].

Examples

calcStability(predicted.dist = 0.3, measured.dist = 0.5)
calcStability(predicted.dist = 0.3, measured.dist = 0.1)


betaStability documentation built on June 5, 2026, 5:08 p.m.