This function calculates various error metrics for a given prediction object.

get_error(obj, actual, level = 95)

Arguments

obj

A prediction object containing mean predictions and intervals.

actual

A numeric vector of actual values.

level

The confidence level for the prediction intervals.

Value

A numeric vector containing the error metrics.

Examples


obj <- list(mean = 10, lower = 8, upper = 12)
actual <- 11
get_error(obj, actual)
#> Error in get_error(obj, actual): could not find function "get_error"