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

Possible error in r2_xu in performance #598

Open
martinphilison opened this issue Jul 12, 2023 · 0 comments
Open

Possible error in r2_xu in performance #598

martinphilison opened this issue Jul 12, 2023 · 0 comments
Labels
3 investigators ❔❓ Need to look further into this issue Bug 🐛 Something isn't working

Comments

@martinphilison
Copy link

Hello,

I just wanted to briefly point out that, in my opinion, r2_xu in performance might not be correctly specified; to me it looks like the function calculates an omega as given in equation (6) of Xu (2003; 0.1002/sim.1572), altough this equation seems to be only for null models. In the current version r2_xu is calculated as follows:

r2_xu <- 1 - stats::var(stats::residuals(model, verbose = FALSE))/stats::var(insight::get_response(model, verbose = FALSE))

This means that the variance of the residuals of the model with covariates is devided by the variance of the reponse (equation 6), not by the residual variance of the null model (as in equation 5).

Of course I might also get it wrong?

Best wishes

@strengejacke strengejacke added Bug 🐛 Something isn't working 3 investigators ❔❓ Need to look further into this issue labels Sep 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 investigators ❔❓ Need to look further into this issue Bug 🐛 Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants