Hi @Ewan-Keith, as I mentioned in the email I sent a while back we will be releasing a major update to the loo package (this week I hope) and I wanted to follow up and give you a bit more detail specific to your package. In order to accommodate some new features, the structure of the object returned by loo() is changing slightly. In your case I think you only need to make a few small tweaks to rstansim.
The new loo objects will have a component estimates which is a matrix from which you can pull the required info. For example, if loo_obj is the result from a call to loo then loo_obj$estimates will be a matrix like this:
I think that's basically all you need to do, unless there are other files in the package that also compute loo, in which case the same thing applies.
I will send a follow-up email once the loo update is on CRAN but until then you can install it from the master branch at stan-dev/loo if you want to test.
Hi @Ewan-Keith, as I mentioned in the email I sent a while back we will be releasing a major update to the loo package (this week I hope) and I wanted to follow up and give you a bit more detail specific to your package. In order to accommodate some new features, the structure of the object returned by
loo()
is changing slightly. In your case I think you only need to make a few small tweaks to rstansim.The new
loo
objects will have a componentestimates
which is a matrix from which you can pull the required info. For example, ifloo_obj
is the result from a call toloo
thenloo_obj$estimates
will be a matrix like this:So in your
fit_models-utilities
file, you can replace these lineshttps://github.com/Ewan-Keith/rstansim/blob/02593d4237b3d37346445b48e91b0df1d8db1947/R/fit_models-utilities.R#L167-L183
with something like this:
I think that's basically all you need to do, unless there are other files in the package that also compute
loo
, in which case the same thing applies.I will send a follow-up email once the loo update is on CRAN but until then you can install it from the master branch at
stan-dev/loo
if you want to test.