Returns the width of each prediction interval.
See also
Other diagnostics:
conformal_compare(),
conformal_pvalue(),
coverage(),
coverage_by_bin(),
coverage_by_group(),
set_size()
Examples
set.seed(42)
x <- matrix(rnorm(200 * 3), ncol = 3)
y <- x[, 1] * 2 + rnorm(200)
x_new <- matrix(rnorm(50 * 3), ncol = 3)
result <- conformal_split(x, y, model = y ~ ., x_new = x_new)
widths <- interval_width(result)
summary(widths)
#> Min. 1st Qu. Median Mean 3rd Qu. Max.
#> 2.983 2.983 2.983 2.983 2.983 2.983