As the title to my question says, I am confused as to when the $R^2$ of a model fit does not equal the slope of the regression between observed and predicted values.
I am trying to present model prediction statistics in a similar way to those presented in the summary figures of the Globcolor validation report (link) - (e.g. figure from page 53 of the .pdf):
Here we see that they present the plot of observed versus predicted Chlorophyll concentrations, as well as statistics relating to its regression (e.g. the dashed line: $R^2$, $RMS$, $\alpha$ - intercept, and $\beta$ - slope).
My issue is that in my comparisons, I always get exactly the same value for the overall model fit $R^2$ and $\beta$-slope of the observed versus predicted regression.
Basic question: When (if ever) can these be different?
I have included a basic example of my problem in the following R script:
set.seed(1) n <- 100 x <- runif(n) e <- rnorm(n) a <- 3 b <- 5 y <- a + x*b + e #fit model fit <- lm( y ~ x ) #plot regression plot(x,y) abline(fit) #plot predicted versus observed png("plot.png", units="in", width=5, height=5, res=400) par(mar=c(5,5,1,1)) pred <- predict(fit) plot(y, pred, xlim=range(c(y,pred)), ylim=range(c(y,pred)), xlab="observed", ylab="predicted") abline(0,1, lwd=2, col=8) #add regression fit2 <- lm(pred ~ y) lgd <- c( paste("R^2 =", round(summary(fit2)$r.squared,3)), paste("Offset =", round(coef(fit2),3)), paste("Slope =", round(coef(fit2),3)) ) legend("topleft", legend=lgd) abline(fit2, lwd=2) legend("bottomright", legend=c("predicted ~ observed", "1:1"), col=c(1,8), lty=1, lwd=2) dev.off() cor(pred, y)^2 # also the same