Skip to contents

The standard deviation ratio compares the sample standard deviation of predictions with that of observations.

Usage

sd_ratio(obs, pred, na.rm = TRUE)

Arguments

obs

Numeric observation vector.

pred

Numeric prediction vector paired with obs.

na.rm

Logical; remove incomplete pairs?

Value

One numeric value.

Details

$$\mathrm{SD\ ratio}= \sqrt{\frac{\sum_{i=1}^{n}(pred_i-\bar{pred})^2} {\sum_{i=1}^{n}(obs_i-\bar{obs})^2}}.$$

The ratio is non-negative and one indicates equal variability. Values below one indicate that predictions have less variability than the observations; values above one indicate that predictions have more variability than the observations. It assesses variability, not mean bias or association, and returns NA with a warning when fewer than two valid pairs remain or the observations have zero variance. Missing-value handling follows bias().

References

Taylor, K. E. (2001). Summarizing multiple aspects of model performance in a single diagram. Journal of Geophysical Research, 106, 7183-7192. doi:10.1029/2000JD900719

Examples

sd_ratio(1:3, c(1, 3, 2))
#> [1] 1