StatisticalRethinkingJulia / StatisticalRethinking.jl

Julia package with selected functions in the R package `rethinking`. Used in the SR2... projects.
MIT License
385 stars 32 forks source link

Implement sample from ModeResult #141

Closed Shmuma closed 2 years ago

Shmuma commented 2 years ago

Finally found the source of lppd mismatch with the book - during sampling I did independent sampling, but need to use full covariance matrix. It lead to different samples and, as a result, discrepancy in LPPD values computed in chapter 7.

This code implements sampling from ModeResult and produce Chains object.

goedman commented 2 years ago

Hi Max ( @Shmuma ),

I wonder if this is similar to https://github.com/StatisticalRethinkingJulia/StatisticalRethinking.jl/issues/140#issuecomment-924403497.

Shmuma commented 2 years ago

Yes, this is the evolution of this code :). Doing sampling in the loop was a big mistake, though.