This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License
using CovidSEIR, Plots, DataFrames, JLD2, StatsPlots, MCMCChains
Plots.pyplot()
jmddir = normpath(joinpath(dirname(Base.find_package("CovidSEIR")),"..","docs","jmd"))
covdf = covidjhudata();
Italy¶
italy = CountryData(covdf, "Italy");
itmod = CovidSEIR.TimeVarying.countrymodel(italy)
cc = Turing.psample(itmod, NUTS(0.65), 5000, 4)
import JLD2
JLD2.@save "$jmddir/italy_tv_$(Dates.today()).jld2" cc
JLD2.@load "$jmddir/italy_dhmc_2020-04-13.jld2" cc;
Error: SystemError: opening file "/home/paul/.julia/dev/CovidSEIR/docs/jmd/
italy_dhmc_2020-04-13.jld2": No such file or directory
cc = MCMCChains.Chains(collect(cc.value.data), replace.(cc.name_map.parameters, r"([^\[])([1-9])" => s"\1[\2]"))
Error: UndefVarError: cc not defined
Estimates¶
plot(cc)
Error: UndefVarError: cc not defined
describe(cc)
Error: UndefVarError: cc not defined
Fit¶
sdf = simtrajectories(cc, italy, 1:200)
Error: UndefVarError: cc not defined
f = plotvars(sdf, italy)
Error: UndefVarError: sdf not defined
f.fit
Error: UndefVarError: f not defined
As with Canada, the fit is very good, and the posterior distribution of observables is very precise.
Implications¶
for fig in f.trajectories
display(fig)
end
Error: UndefVarError: f not defined