Dear brms developers,
I ran a brms model on a dataset containing almost 11000 species using the following command.
fit <- brm(formula =brl ~ LH + (1|species),
data = data_,
cov_ranef = list(species=phyloMat),
family = gaussian(),
save_all_pars = T,
chains = 2,
cores = 10,
backend = "cmdstanr",
threads = threading(15)
)
Then, we used bayes_R2 and loo_R2 methods to calculate the r2. However, we got a weird result: R2 estimates were 1 in both cases.
bayes_r2 = bayes_R2(fit)
loo_r2 = loo_R2(fit)
> print(bayes_r2)
Estimate Est.Error Q2.5 Q97.5
R2 1 2.769589e-09 1 1
> print(loo_r2)
Estimate Est.Error Q2.5 Q97.5
R2 1 1.131317e-10 1 1
Can you help us infer what caused this problem?
Thank you very much!
Sincerely,
Dong