Here is a sample of my data:
df <- data.frame(surface_area = c(0.25, 1, 2.25, 4, 6.25),
weight = c(0.8, 3.267, 7.733, 13.533, 21.8333))
The code for my plot and my plot:
plot <- ggplot(data = df, aes(x = surface_area, y = weight)) + geom_point() +
geom_smooth(method = 'lm',
se = FALSE) +
stat_regline_equation(aes(label = ..rr.label..),
label.x = 4,
label.y = 5.8,
size = 6) +
stat_regline_equation(label.x = 4,
label.y = 6.5,
size = 6)
The line doesn't quite perfectly fit the data, but I am still getting a R-squared of 1. How do I increase the significant figures or decimal places of the R-squared to get a more accurate R-squared?
Many thanks!