# Compute the squarer error exp scoring function.
df <- data.frame(
y = rep(x = 0, times = 5),
x = -2:2,
a = c(-2, -1, 1, 2, 3)
)
df$squaredexp_error <- serrexp_sf(x = df$x, y = df$y, a = df$a)
print(df)
Run the code above in your browser using DataLab