df1 <- data.frame(x = 1:6, y = c(15, 37, 52, 59, 83, 92))
model <- lm(y ~ x - 1, data = df1) # No-intercept model
plot_kvr2(model)
# Compare all definitions
plot_kvr2(model, plot_type = "r2")
# Diagnostic plot to see why some R2 might be problematic
plot_kvr2(model, plot_type = "diag")
Run the code above in your browser using DataLab