Skip to main content
. Author manuscript; available in PMC: 2020 Aug 14.
Published in final edited form as: Bayesian Anal. 2019 Jan 5;15(1):79–102. doi: 10.1214/18-ba1142
Algorithm 1 Posterior updates within each iteration.
Input:the parameters from the last iterationOutput:the updated parameters for the next iteration1:DrawωN(ω,τω2Iq).Updateω=ωwith probabilitymin{1,ϕ(ω0,Vω)if(yiω,)ϕ(ω0,Vω)if(yiω,)}.2:DrawγN{μ(γ),τγ2Ip},whereμ(γ)=γ+τγ22(logfγ12σγ2Λγγ)withlogfγj=i=1n(a(ziTω+xiTβ)+b(ziTω+xiTβ))xijβjγj.Updateγ=γwith probabilitymin{1,ϕ(γμ(γ),τγ2Ip)ϕ(γ0,σγ2Λγ)if(yiγ,)ϕ(γμ(γ),τγ2Ip)ϕ(γ0,σγ2Λγ)if(yiγ,)}.3:Updateξ={j:γj>λ}.4:Forjξ,drawαjN(0,σα2).DrawαξN{μ(αξ),τα2Iξ},whereμ(αξ)=αξ+τα22(logfαξ12Σξαξ)withlogfαj=i=1n(a(ziTω+xiTβ)+b(ziTω+xiTβ))xijforjξandΣξ=σα2Iξ.Updateαξ=αξwith probabilitymin{1,ϕ(αξμ(αξ),τα2Iξ)ϕ(αξ0,Σξ)if(yiαξ,)ϕ(αξμ(αξ),τα2Iξ)ϕ(αξ0,Σξ)if(yiαξ,)}.5:Drawσγ2IG(a~γ,b~γ)wherea~γ=aγ+p2andb~γ=bγ+γTΛγ1γ2.6:Drawσα2IG(a~α,b~α)wherea~α=aα+p2andb~α=bα+jαj22.7:(Optional)DrawεN(ε,τε2).Updateε=εwith probabilitymin{1,L+εIpn12εexp{εγTγ(2σγ2)(logεμε)2(2σε2)}L+εIpn12εexp{εγTγ(2σγ2)(logεμε)2(2σε2)}}.8:(Optional)DrawλN+(λ,λl,λu,τλ2).Updateλ=λwith probabilitymin{1,ϕ+(λλ,λl,λu,τλ2)if(yiλ,)ϕ+(λλ,λλ,λu,τλ2)if(yiλ,)}.