I ran loo on my models and there are 5-7 observations out of ~3000 per model that have pareto k values > 0.7. I want to do an exact loo calculation for these observations and recombine with approximate loo, but my model is with rstan, not rstanarm.

In the loo documentation, it says that when you have just a few k values that are problematic, you can just do an exact loo calculation for that observation and combine them with the approximate loo calculations.

If there are a small number of problematic k values then we can use a feature in

rstanarmthat lets us refit the model once for each of these problematic observations. Each time the model is refit, one of the observations with a high k value is omitted and the LOO calculations are performed exactly for that observation. The results are then recombined with the approximate LOO calculations already carried out for the observations without problematic k values

There’s an example given for rstanarm models using the loo function, but it doesn’t work with a general stanfit object.

I know how to rerun my stan model while leaving out an observation, but I don’t understand how to do the exact calculation and recombination steps. Are there examples somewhere you can point me to?