Closed paul-buerkner closed 6 years ago
Hi, Thanks for sharing. It seems I am able to run this code without error on my computer.
library(brms)
fit1 <- brm(rating ~ treat + period, data = inhaler)
fit2 <- brm(rating ~ treat + period + carry, data = inhaler)
ll1 <- log_lik(fit1)
ll2 <- log_lik(fit2)
model_weights(list(ll1, ll2), method="stacking")
The stacking weights are:
[,1] [,2]
[1,] "Model 1" "Model 2"
[2,] "1" "0"
[1] 9.999992e-01 8.183364e-07
So it might be the gitHub version problem. I will try to fix it soon. Yuling
Thanks that would be perfect!
Will model_weights
and model_select
be part of the loo 2.0 release? If yes, I would really appreciate you merging the latest version of these functions into the new-psis
branch so that I can write wrappes around them for use with brmsfit objects.
Yes I believe it will be merged very soon...
I have made a pull request and model_weghts() will be there.
I recently updated to the dev version of loo 2.0 (new-psis branch) to prepare brms for its release. I also tried out the new
model_weights
function, which results in an error. Reproducible example: