gof_stats: Calculates goodness-of-fit statistics

Description Usage Arguments Value Author(s) References Examples

View source: R/gof_stats.R

Description

It obtains goodness-of-fit statistics (r2emp, RMSE, BIAS, RMSE using provided observed and fitted values. Missing values are removed from the list.

Usage

1
gof_stats(obs, pred)

Arguments

obs

vector of observed values

pred

vector of predicted values

Value

A table with goodness-of-fit statistics: r2emp: empirical coefficient of correlation RMSE (and RMSE BIAS (and BIAS Theil's Inequality Coefficient (Ahlburg 1984)

Author(s)

P. Moreno & S.A. Gezan

References

Alburhg, D.A. (1984). Forecast Evaluation and Improvement using Thiel's Decomposition. Journal of Forecasting 3(3):345-351

Examples

1
2
3
4
x <- c(1:20)
yobs <- 10 + 0.1*x + rnorm(20, mean=0, sd=0.2)
fit <- lm(yobs ~ x)
gof_stats(yobs, predict(fit))

sgezan/Nothopack documentation built on April 25, 2021, 8:03 a.m.