# Compute the expectile identification function.
df <- data.frame(
y = rep(x = 0, times = 6),
x = c(2, 2, -2, -2, 0, 0),
p = rep(x = c(0.05, 0.95), times = 3)
)
df$expectile_if <- expectile_if(x = df$x, y = df$y, p = df$p)
Run the code above in your browser using DataLab