strengejacke / sjPlot

sjPlot - Data Visualization for Statistics in Social Science

Home Page:https://strengejacke.github.io/sjPlot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

r2_xu in perfomance package

martinphilison opened this issue · comments

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

Sorry, wrong place.