Calculates different accuracy measures, most prominently RMSE.

rmserr(x, y, summary = FALSE)

Arguments

x, y

two vectors of real numbers

summary

logical; should a summary be printed to the screen?

Details

Calculates six different measures of accuracy for two given vectors or sequences of real numbers:

MAEMean Absolute Error
MSEMean Squared Error
RMSERoot Mean Squared Error
MAPEMean Absolute Percentage Error
LMSENormalized Mean Squared Error
rSTDrelative Standard Deviation

Value

Returns a list with different accuracy measures.

References

Gentle, J. E. (2009). Computational Statistics, section 10.3. Springer Science+Business Media LCC, New York.

Note

Often used in Data Mining for predicting the accuracy of predictions.

Examples

x <- rep(1, 10)
y <- rnorm(10, 1, 0.1)
rmserr(x, y, summary = TRUE)
#> -- Error Terms --------------------------------------------------
#>  MAE:   0.0665   	- mean absolute error (in range [ 1 1 ])
#>  MSE:   0.0059   	- mean squared error (the variance?!)
#>  RMSE:  0.0771   	- root mean squared error (std. dev.)
#>  MAPE:  0.0665   	- mean absolute percentage error
#>  LMSE:    Inf   	- normalized mean squared error
#>  rSTD:  0.0771   	- relative standard deviation ( 1 )
#> -----------------------------------------------------------------