|Project Status||Documentation||Build Status|
The StatisticalRethinking.jl v3
package contains functions comparable to the functions in the R package "rethinking" associated with the book Statistical Rethinking by Richard McElreath.
These functions are used in the Pluto notebooks
projects specifically intended for hands-on use while studying the book or taking the course.
To work through the StatisticalRethinking book using Julia and Stan, download
project StatisticalRethinkingStan.jl and open one of the chapter Pluto notebooks.
To work through the StatisticalRethinking book using Julia and Turing, download
project StatisticalRethinkingTuring.jl and open a Pluto notebook.
Time permitting I would love to see a StatisticalRethinkingDhmc.jl, which could be a combination of Soss.jl and DynamicHMC.jl, and a StatisticalRethinkingMamba.jl!
If interested in either of the last 2 projects, please contact me!
This is a breaking change from v2 of StatisticalRethinking.jl. I expect the first stage of this work to be completed by late Nov 2020.
If you prefer to use v2, you can use
] add StatisticalRethinking@v2.x.y where 2.x.y is the latest released version for v2.
Given that Julia provides several very capable packages that support mcmc simulation, it only seemed appropriate to make StatisticalRethinking on Julia mcmc implementation independent.
The availablility of DynamicHMC, the huge progress made by the Turing.jl team over the last 2 years, the introduction of Julia
projects in addition to Julia
packages, the novel approach to notebooks in Pluto.jl and the work by Karajan were a few of the ideas that triggered exploring a new setup for StatisticalRethinking.jl and the 'course' projects StatistcalRethinkingStan and StatisticalrethinkingTuring
An early, experimental version of StructuralCausalModels.jl is also included as a dependency in the StatisticalRethinking.jl v3 package. In the meantime I will definitely keep my eyes on Omega.jl and CausalInference.jl. StructuralCausalModels does provide ways to convert DAGs to Daggity and ggm formats.
Finally, for a good while I have been looking for a great statistics book using Julia as kind of an introductory text to StatisticalRethinking and I believe the first couple of chapters in an upcoming book Statistics with Julia by Yoni Nazarathy and Hayden Klok are exactly that.
As StatisticalRethinking v3 is also (DrWatson & Pkg) project based and uses Pluto notebooks, I have converted the book
listings in the first 5 chapters to Pluto Notebooks in a new repository in StatisticalRethinkingJulia, i.e. StatisticsWithJuliaPlutoNotebooks.
After chapter 4,
Statistics with Julia follows the frequentionist approach while
Statistical Rethinking opts for the Bayesian approach. Most of the material in chapters 5 and 6 of
Statistics with Julia is therefore also covered using a more Bayesian perspective in the early chapters of the notebook projects StatisticalRethinkingStan and StatisticalRethinkingTuring.
Note 1: It is my intention to moce (stan based) quap() into a separate package StanQuap.jl once I'm satified with its features and stability. Likely in v3.3.
Note 2: Once all models are updated this will be released as v3.2.0. At the same time StanModels.jl will be updated.
Align (stanbased) quap with Turing quap. quap() now returns a NamedTuple that includes a field
distr which represents the quadratic Normal (MvNormal) approximation.
StatisticalRethinking.jl v3 is independent of the underlying mcmc package. All scripts previously in StatisticalRethinking.jl v2 holding the snippets have been replaced by Pluto notebooks in the above mentioned mcmc specific
Initially StatisticalRethinkingTuring.jl will lag StatisticalRethinkingStan.jl somewhat but later this year both will cover the same chapters.
It is the intention to develop tests for StatisticalRethinking.jl v3 that work across the different mcmc implementations. This will limit dependencies to the
Currently the latest release available in the StatisticalRethinking.jl v2 format.
To install the package (from the REPL):
] add StatisticalRethinking
but in most cases this package will be a dependency of another package or project, e.g. StatisticalRethinkingStan.jl or StatisticalRethinkingTuring.jl.
Of course, without the excellent textbook by Richard McElreath, this package would not have been possible. The author has also been supportive of this work and gave permission to use the datasets.
Question and contributions are very welcome, as are feature requests and suggestions. Please open an issue if you encounter any problems or have a question.
4 days ago