Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempt to fix replication issue #436

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion EpiAware/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ FillArrays = "1.11"
LinearAlgebra = ">= 1.9"
LogExpFunctions = "0.3"
MCMCChains = "6.0"
Pathfinder = "0.8, 0.9"
Pathfinder = "0.8"
QuadGK = "2.9"
Random = ">= 1.9"
Reexport = "1.2"
Expand Down
15 changes: 13 additions & 2 deletions EpiAware/docs/src/showcase/replications/mishra-2020/index.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
### A Pluto.jl notebook ###
# v0.19.43
# v0.19.46

using Markdown
using InteractiveUtils
Expand Down Expand Up @@ -408,7 +408,9 @@ inference_method = EpiMethod(
sampler = NUTSampler(adtype = AutoReverseDiff(),
ndraws = 2000,
nchains = num_threads,
mcmc_parallel = MCMCThreads())
mcmc_parallel = MCMCThreads(),
nadapts = 500
)
)

# ╔═╡ 92333a96-5c9b-46e1-9a8f-f1890831066b
Expand Down Expand Up @@ -474,6 +476,11 @@ let
hcat, generated_quantities(mdl_unconditional, inference_results.samples)) do gen
gen.generated_y_t
end

if any(predicted_y_t .> 5_000)
throw("Sampled y_t badly")
end

predicted_I_t = mapreduce(
hcat, gens) do gen
gen.I_t
Expand All @@ -483,6 +490,10 @@ let
exp.(gen.Z_t)
end

if any(predicted_R_t .> 250)
throw("Sampled R_t badly")
end

p1 = plot(D, predicted_y_t, c = :grey, alpha = 0.05, lab = "")
scatter!(p1, D, C,
lab = "Actual cases",
Expand Down
Loading