powered by
Caclulate absolute error as
$$ abs(true_value - prediction) $$
abs_error(true_values, predictions)
A vector with the true observed values of size n
numeric vector with predictions, corresponding to the quantiles in a second vector, `quantiles`.
vector with the absolute error
# NOT RUN { true_values <- rnorm(30, mean = 1:30) predicted_values <- rnorm(30, mean = 1:30) abs_error(true_values, predicted_values) # }
Run the code above in your browser using DataLab