CMBSI <- lm(BSI_GSI_mzp2_T ~ ctq_sum, data = Datamed_cleanpair)
summary(CMBSI)
windows()
ggplot(Datamed_cleanpair, aes(x = ctq_sum, y = BSI_GSI_mzp2_T)) +
geom_point() +
geom_smooth(method = lm, se = TRUE, fullrange = TRUE) +
xlab('CM-Load') +
ylab('GSI Score') +
geom_text(label = paste("R² = ", round(summary(CMBSI)$r.squared, 2)), x = 10, y = 5)
I get a scatterplot but the R² is not in the image and I would like to add the p.value as well.