RPD: Residual Prediction Deviation (RPD)

View source: R/RMSEP_RPD.R

RPDR Documentation

Residual Prediction Deviation (RPD)

Description

This function computes the Residual Prediction Deviation (RPD), which is defined as the standard deviation of observed values divided by the Root Mean Square Error or Prediction (RMSEP). The RDP takes both the prediction error and the variation of observed values into account, providing a metric of model validity that is more objective than the RMSEP and more easily comparable across model validation studies. The greater the RPD, the better the model's predictive capacity.

Usage

RPD(predicted, observed, na.rm = FALSE)

Arguments

predicted

a numeric vector containing predicted values.

observed

a numeric vector of the same length as “'predicted“' containing observed values.

na.rm

Boolean parameter indicating whether NA values should be removed before the analysis

Details

Interpretation of the RPD is somewhat arbitrary, with different thresholds for a good model used in the literature. Many studies call a model *excellent*, when the RPD is above 2 (but other classification use thresholds as high as 8 for this).

Value

numeric value of the RDP.

Author(s)

Eike Luedeling

References

Williams PC and Sobering DC (1993) Comparison of commercial near infrared transmittance and reflectance instruments for analysis of whole grains and seeds. J. Near Infrared Spectrosc. 1, 25-32 (I didn't have access to this paper, but have noticed that it is often provided as the key reference for the RPD).

Examples


predicted<-c(1,2,3,4,5,6,7,8,9,10)
observed<-c(1.5,1.8,3.3,3.9,4.4,6,7.5,9,11,10)

RPD(predicted,observed)


chillR documentation built on Nov. 28, 2023, 1:09 a.m.