I think my problem has something to do with this: bayes_R2 and conditioning on random effects - #16 by avehtari
brms::bayes_R2.brmsfit()
estimates R2 as:
Var(pred) / (Var(pred) + Var(pred - y))
which is the the “residual based R^2” in Bayesian R2 and LOO-R2 and R-squared for Bayesian regression models according to @avehtari
But I’m thinking about it in terms of the “model based R^2”:
Var(pred) / (Var(pred) + sigma^2)
When sigma = 0
, adding a covariate will not change this proportion.
However even this is an incomplete understanding, because Var(pred)
can include predictions based on all fixed + random effects (i.e., re.form = NULL
), OR predictions based only on fixed effects (re.form = NA
).
Adding a covariate will change any predictions based on fixed effects while changes to tau will only change predictions based on random effects.
All this is to say that adding a covariate in a meta-regression can increase the residual between-subject variability (tau^2) and at the same time improve the predictions based on the fixed effects (i.e., bayes_R2(re.form=NA)
, because these are two seperate sources of variability.