stan-dev / loo

loo R package for approximate leave-one-out cross-validation (LOO-CV) and Pareto smoothed importance sampling (PSIS)
https://mc-stan.org/loo
Other
150 stars 34 forks source link

possible typo in LFO-CV vignette #243

Closed copernican closed 7 months ago

copernican commented 7 months ago

In the "Approximate $M$-step-ahead predictions" section of the LFO-CV vignette, there is an assignment

approx_elpds_1sap[L + 1] <- log_mean_exp(loglikm)

Should this assignment instead be approx_elpds_4sap?

jgabry commented 7 months ago

I think you're right, thank you for pointing this out! I just made a PR to fix it: https://github.com/stan-dev/loo/pull/244