# Compute the Lq-mean scoring function.
df <- data.frame(
y = rep(x = 0, times = 6),
x = c(2, 2, -2, -2, 0, 0),
q = c(2, 3, 2, 3, 2, 3)
)
df$lqmean_penalty <- lqmean_sf(x = df$x, y = df$y, q = df$q)
print(df)
Run the code above in your browser using DataLab