Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correction to Equation 3.10 #91

Open
opherdonchin opened this issue Feb 1, 2024 · 0 comments
Open

Correction to Equation 3.10 #91

opherdonchin opened this issue Feb 1, 2024 · 0 comments

Comments

@opherdonchin
Copy link

Equation 3.10 currently reads:

$$ R^2 = \frac{V^N_{n=1} E[\hat{y}^s]}{V^N_{n=1} E[\hat{y}^s] + V^S_{n=1}(\hat{y}^s - y)} $$

I assume that this is based on Gelman's 2019 article in The American Satistician R-squared for Bayesian Regression Models. From that paper, I believe it is clear that the intended formula is:

$$ R^2 = \frac{V^N_{n=1} E[\hat{y}^s]}{V^N_{n=1} E[\hat{y}^s] + E[V^N_{n=1}(\hat{y}^s - y)]} $$

That is, rather than take the variance over samples of the residuals for each point (and presumably then take the expectation of this variance over data points, although this isn't in the equation), you should take the variance over the residuals over data points, and then take the expectation of this over samples.

Thanks and thanks for the book!
Opher

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant