Skip to main content
. Author manuscript; available in PMC: 2021 Dec 2.
Published in final edited form as: IEEE Access. 2020 Sep 30;8:175244–175264. doi: 10.1109/ACCESS.2020.3019922
Algorithm 2 Epidemic Forecasting with Stochastic SIR Model
Input:k,P(xkz1:k),P(θkz1:k),J,L,K,P,{β^kE}k=kLkOutput:{s^kF,ı^kF,β^kF,γ^kF}k=k+1k+KINITIALIZATION1:DrawJsamplesx~k(j)=[s~k(j),ı~k(j)]TfromP(xkz1:k)2:DrawJsamplesθ~k(j)=[β~k(j),γ~k(j)]TfromP(θkz1:k)3:β.^L,k=0L(L2)(β^kL+E(L+1)1=0Lβ^kE)Δt=0L(L2)24:σ^ω,L2=1L(β^k+1Eβ^kEΔtβ.^L,k)2L15:σ.L,k2σ^ω,L2Δt2=0L(L2)2FORECASTING6:forj=1toJdo7:fork=k+1tok+KdoSTATE EVOLUTION8:Drawλ=[λ1,λ2]TN(0,I2Δt)9:σ1,k1(j)P1β~k1(j)s~k1(j)ı~k1(j)10:σ2,k1(j)P1γ~k1(j)ı~k1(j)11:s~k(j)s~k1(j)β~k1(j)s~k1(j)ı~k1(j)Δt+σ1,k1(j)λ112:ı~k(j)ı~k1(j)+β~k1(j)s~k1(j)ı~k1(j)Δtγ~k1(j)ı~k1(j)Δtσ1,k1(j)λ1+σ2,k1(j)λ2PARAMETERS EVOLUTION13:DrawηN(0,σ.L,k2)14:β~k(j)β~k1(j)+β.^L,kΔt+η15:γ~k(j)γ~k1(j)ENSEMBLE MEAN16:s^kFJ1j=1Js~k(j)17:ı^kFJ1j=1Jı~k(j)18:β^kFJ1j=1Jβ~k(j)19:γ^kFJ1j=1Jγ~k(j)20:endfor21:endfor