Skip to content
This repository was archived by the owner on Mar 15, 2024. It is now read-only.

Commit a48d6c8

Browse files
committed
Release 2.0.0 final
1 parent 6681ec8 commit a48d6c8

File tree

4 files changed

+5
-27
lines changed

4 files changed

+5
-27
lines changed

Project.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
1717
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
1818
Requires = "ae029012-a4dd-5104-9daa-d747884805df"
1919
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
20+
StatsFuns = "4c63d2b9-4356-54db-8cca-17b64c39e42c"
2021
TransformVariables = "84d833dd-6860-57f9-a1a7-6da5db126cff"
2122

2223
[compat]
@@ -30,6 +31,7 @@ MonteCarloMeasurements = "0.8"
3031
Parameters = "0.12"
3132
Reexport = "0.2"
3233
Requires = "1.0"
34+
StatsFuns = "0.9"
3335
TransformVariables = "0.3"
3436
julia = "1"
3537

scripts/04/m4.5d1.jl

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -68,27 +68,8 @@ P = TransformedLogDensity(make_transformation(model), model)
6868
results = mcmc_with_warmup(Random.GLOBAL_RNG, ∇P, 1000)
6969
posterior = P.transformation.(results.chain)
7070

71-
println()
72-
DynamicHMC.Diagnostics.EBFMI(results.tree_statistics) |> display
73-
println()
74-
75-
DynamicHMC.Diagnostics.summarize_tree_statistics(results.tree_statistics) |> display
76-
println()
77-
78-
a3d = Array{Float64, 3}(undef, 1000, 4, 1);
79-
for j in 1:1
80-
for i in 1:1000
81-
a3d[i, 1:3, j] = values(posterior[i].β)
82-
a3d[i, 4, j] = values(posterior[i].σ)
83-
end
84-
end
85-
86-
pnames = ["β[1]", "β[2]", "β[3]", "σ"]
87-
sections = Dict(
88-
:parameters => pnames,
89-
)
90-
chns = create_mcmcchains(a3d, pnames, sections, start=1);
91-
chns = set_names(chns, Dict("β[1]" => "α", "β[2]" => "β[1]", "β[3]" => "β[2]"))
71+
p = as_particles(posterior)
72+
display(p)
9273

9374
stan_result = "
9475
Iterations = 1:1000
@@ -111,6 +92,4 @@ Quantiles:
11192
sigma 4.76114350 4.9816850 5.10326000 5.2300450 5.51500975
11293
";
11394

114-
describe(chns)
115-
11695
# end of m4.5d.jl

scripts/10/m10.2d.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using DynamicHMCModels, StatsFuns
1+
using DynamicHMCModels, LinearAlgebra, StatsFuns
22

33
ProjDir = @__DIR__
44
cd(ProjDir)

scripts/12/m12.6d.jl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,3 @@ Empirical Posterior Estimates:
8888
a_society.10 -0.094149204 0.2846206232 0.00450024719 0.0080735022 1000.000000
8989
sigma_society 0.310352849 0.1374834682 0.00217380450 0.0057325226 575.187461
9090
";
91-
92-
describe(chns, sections=[:pooled])
93-

0 commit comments

Comments
 (0)