You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-33Lines changed: 9 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,33 +13,21 @@ These functions are used in Jupyter and Pluto notebook `projects` specifically
13
13
14
14
Currently there are 3 of these notebook projects:
15
15
16
-
1. Max Lapan's [rethinking-2ed-julia](https://github.com/Shmuma/rethinking-2ed-julia) which uses Turing.jl and Jupyter notebooks. The intention is to move this project to StatisticalRethinkingJulia and rename it to SR2TuringJupyter.jl.
16
+
1. Max Lapan's [rethinking-2ed-julia](https://github.com/Shmuma/rethinking-2ed-julia) which uses Turing.jl and Jupyter notebooks. This has been forked, renamed to SR2TuringJupyter.jl and modified in a few places (e.g. data files are obtained from StatisticalRethinking.jl).
17
17
18
-
### *Note 1: Renaming of `rethinking-2ed-julia` to SR2TuringJupyter.jl.*
19
-
20
-
Currently `SR2TuringJupyter.jl` has not yet been renamed. This will be done after working through the projects 2 and 3 below. Use above link to access the repository.
21
-
22
-
2. The [SR2TuringPluto.jl](https://github.com/StatisticalRethinkingJulia/SR2TuringPluto.jl) project, also Turing.jl based but using Pluto.jl instead of Jupyter. It will be completely based on Max Lapan's work above, but only in Pluto.
18
+
2. The [SR2TuringPluto.jl](https://github.com/StatisticalRethinkingJulia/SR2TuringPluto.jl) project, also Turing.jl based but using Pluto.jl instead of Jupyter. It is based on Max Lapan's work above.
23
19
24
20
3. The [SR2StanPluto.jl](https://github.com/StatisticalRethinkingJulia/SR2StanPluto.jl) project, which uses Stan as implemented in StanSample.jl and StanQuap.jl. See [StanJulia](https://github.com/StanJulia).
25
21
26
22
There is a fourth option to study the (Turing.jl) models in the Statistical Rethinking book which is in the form of a package and Franklin web pages: [TuringModels.jl](https://github.com/StatisticalRethinkingJulia/TuringModels.jl).
27
23
28
-
### *Note 2: Version 4 is under development and breaking in many respects.*
29
-
30
-
Version 4 has a very different setup and is a breaking change from v3 of StatisticalRethinking.jl. See below for what has changed.
31
-
32
-
For now StatisticalRethinking v3.3.6 is more complete in conjunction with the SR2StanPluto (v3) and SR2TuringPluto (v1-3) projects.
33
-
34
-
### *Note 3: Large size issue of StatisticalRethinking when `dev`-ed.*
35
-
36
-
As listed in issue [#145](https://github.com/StatisticalRethinkingJulia/StatisticalRethinking.jl/issues/145#issue-1064657635) recently it was noticed that some very old Jupyter notebook files are still present which makes an inital download, e.g. when `dev`-ing the package rather long. This is not a problem when you just `add` the package.
24
+
As listed in issue [#145](https://github.com/StatisticalRethinkingJulia/StatisticalRethinking.jl/issues/145#issue-1064657635) recently it was noticed that some very old Jupyter notebook files are still present which makes an inital download, e.g. when `dev`-ing the package, rather long. This is not a problem when you just `add` the package.
37
25
38
26
## Why a StatisticalRethinking v4?
39
27
40
-
Over time more and better options become available to express the material covered in Statistical Rethinking, e.g. the use of KeyedArrays (provided by [AxisKeys.jl](https://github.com/JuliaArrays/AxisArrays.jl)) for the representation of mcmc chains.
28
+
Over time more and better options become available to express the material covered in Statistical Rethinking, e.g. the use of KeyedArrays (provided by [AxisKeys.jl](https://github.com/JuliaArrays/AxisArrays.jl)) for the representation of mcmc chains.
41
29
42
-
But other examples are the recently developed [ParetoSmooth.jl](https://github.com/TuringLang/ParetoSmooth.jl) used in the PSIS related examples and the preliminary work by [SHMUMA](https://github.com/Shmuma/Dagitty.jl) on a better Dagitty.jl (vs. StructuralCausalModels.jl).
30
+
But other examples are the recently developed [ParetoSmooth.jl](https://github.com/TuringLang/ParetoSmooth.jl)which could be used in the PSIS related examples as a replacement for ParetoSmoothedImportanceSampling.jl and the preliminary work by [SHMUMA](https://github.com/Shmuma/Dagitty.jl) on Dagitty.jl (a potential replacement for StructuralCausalModels.jl).
43
31
44
32
While StatisticalRethinking v3 focused on making StatisticalRethinking.jl mcmc package independent, StatisticalRethinking v4 aims at de-coupling it from a specific graphical package and thus enables new choices for graphics, e.g. using Makie.jl and AlgebraOfGraphics.jl.
45
33
@@ -55,23 +43,21 @@ Also, an attempt has been made to make StatisticalRethinking.jl fit better with
55
43
56
44
4. Inspect the chains using statistical and visual methods. In many cases this will need one or more statistical packages and one of the graphical options.
57
45
58
-
Currently most visual options are StatsPlots/Plots based, e.g. in MCMCChains.jl and StatisticalRethinkingPlots.jl. The setup of StatisticalRethinking v4 enables the future introduction of a new package, StatisticalRethinkingMakie which will be based on Makie.jl and AlgebraOfGraphics.jl.
46
+
Currently visual options are StatsPlots/Plots based, e.g. in MCMCChains.jl and StatisticalRethinkingPlots.jl.
59
47
60
48
5. The above 4 items could all be done by just using StanSample.jl or Turing.jl.
61
49
62
50
**The book Statistical Rethinking has a different objective and studies how models compare, how models can help (or mislead) and why multilevel modeling might help in some cases.**
63
51
64
-
6. For this, additional packages are available, explained and demonstrated, e.g. StructuralCausalModels.jl, ParetoSmooth.jl and quite a few more.
52
+
6. For this, additional packages are available, explained and demonstrated, e.g. StructuralCausalModels.jl, ParetoSmoothedImportanceSampling.jl and quite a few more.
65
53
66
54
## Using StatisticalRethinking v4
67
55
68
56
To work through the StatisticalRethinking book using Julia and Turing, download either of the `projects`[SRTuringJupyter.jl](https://github.com/StatisticalRethinkingJulia/SRTuringJupyter.jl) or [SRTuringPluto.jl](https://github.com/StatisticalRethinkingJulia/SRTuringPluto.jl).
69
57
70
-
### Note 3:
71
-
72
58
To work through the StatisticalRethinking book using Julia and Stan, download `project`[SRStanPluto.jl](https://github.com/StatisticalRethinkingJulia/SRStanPluto.jl).
73
59
74
-
All three projects create a Julia environment where most needed packages are available.
60
+
All three projects create a Julia environment where most needed packages are available and can be imported.
75
61
76
62
In addition to providing a Julia package environment, these also contain chapter by chapter Jupyter or Pluto notebooks to work through the Statistical Rethinking book.
77
63
@@ -103,10 +89,6 @@ On a high level, the StatisticalRethinkingJulia ecosystem contains 4 layers:
103
89
104
90
4. Chapter by chapter notebooks.
105
91
106
-
I would love to see a SR2DHMC....jl, which could be a combination of Soss.jl and DynamicHMC.jl, and a SR2Mamba.jl!
107
-
108
-
If interested in either of these projects, please contact me!
109
-
110
92
## Some background info on previous versions
111
93
112
94
Given that Julia provides several very capable packages that support mcmc simulation, it only seemed appropriate to make StatisticalRethinking (v3) on Julia mcmc implementation independent.
@@ -115,13 +97,7 @@ The availablility of DynamicHMC, the huge progress made by the Turing.jl team ov
115
97
116
98
An early, experimental version of [StructuralCausalModels.jl](https://github.com/StatisticalRethinkingJulia/StructuralCausalModels.jl) is also included as a dependency in the StatisticalRethinking.jl package. In the meantime I will definitely keep my eyes on [Dagitty.jl](https://github.com/Shmuma/Dagitty.jl), [Omega.jl](https://github.com/zenna/Omega.jl) and [CausalInference.jl](https://github.com/mschauer/CausalInference.jl). In particular Dagitty.jl has very similar objectives as StructuralCausalModels.jl and over time might replace it in the StatisticalRethinkingJulia ecosystem. For now, StructuralCausalModels does provide ways to convert DAGs to Dagitty and ggm formats.
117
99
118
-
The in v3 added introduced dependency [StatsModelComparisons.jl](https://github.com/StatisticalRethinkingJulia/StatsModelComparisons.jl) which provides PSIS and WAIC statistics for model comparison is deprecated in v4. For PSIS and LOO ParetoSmooth.jl is now used and WAIC has been moved to StatisticalRethinking.jl,
119
-
120
-
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](https://statisticswithjulia.org/index.html) by Yoni Nazarathy and Hayden Klok are exactly that.
121
-
122
-
As [StatisticalRethinking](https://github.com/StatisticalRethinkingJulia) v3/4 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](https://github.com/StatisticalRethinkingJulia/StatisticsWithJuliaPlutoNotebooks.jl).
123
-
124
-
After chapter 4, `Statistics with Julia` follows the frequentist 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 [SR2StanPluto](https://github.com/StatisticalRethinkingJulia/SR2StanPluto.jl) and [SR2TuringPluto](https://github.com/StatisticalRethinkingJulia/SR2TuringPluto.jl).
100
+
The in v3 added introduced dependency [StatsModelComparisons.jl](https://github.com/StatisticalRethinkingJulia/StatsModelComparisons.jl) which provides PSIS and WAIC statistics for model comparison is deprecated in v4. For WAIC, PSIS and LOO ParetoSmoothedImportanceSampling.jl is used.
0 commit comments