Skip to contents

Ratio of performance to deviation (RPD) scales RMSE by the sample standard deviation of observations.

Usage

rpd(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{RPD}= \frac{\sqrt{(n-1)^{-1}\sum_{i=1}^{n}(obs_i-\bar{obs})^2}} {\sqrt{n^{-1}\sum_{i=1}^{n}(obs_i-pred_i)^2}}.$$

RPD is non-negative and larger values indicate lower error relative to observed variation. For perfect predictions with nonzero observed variation it returns Inf, the mathematically defined ratio with zero RMSE, without a warning. It returns NA with a warning for fewer than two retained pairs or for the indeterminate zero-over-zero case. Missing-value handling follows bias().

References

Bellon-Maurel, V., Fernandez-Ahumada, E., Palagos, B., Roger, J.-M., and McBratney, A. (2010). Critical review of chemometric indicators commonly used for assessing the quality of the prediction of soil attributes by NIR spectroscopy. Trends in Analytical Chemistry, 29, 1073-1081. doi:10.1016/j.trac.2010.05.006

See also