Skip to contents

Ratio of performance to interquartile distance (RPIQ) scales RMSE by the interquartile range of observations.

Usage

rpiq(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{RPIQ}= \frac{Q_{0.75}(obs)-Q_{0.25}(obs)} {\sqrt{n^{-1}\sum_{i=1}^{n}(obs_i-pred_i)^2}}.$$

RPIQ is non-negative and larger values indicate lower error relative to the middle 50 percent of observed values. It is less influenced by extremes than rpd(). R uses default type-7 quartiles. For perfect predictions with a nonzero interquartile range it returns Inf; it returns NA with a warning for the indeterminate zero-over-zero case. Missing-value handling follows bias().

References

Bellon-Maurel et al. (2010). See rpd().

See also