View full-text article in PMC Environmetrics. Author manuscript; available in PMC: 2019 Jun 1. Published in final edited form as: Environmetrics. 2018 May 18;29(4):e2504. doi: 10.1002/env.2504 Search in PMC Search in PubMed View in NLM Catalog Add to search Copyright and License information PMC Copyright notice ALGORITHM 1. MFVB algorithm for lagged kernel machine regression. Initialize: μq(1/σ2)>0, μq(β)=1, μq(1/τ2)=1, μq(1/ω2)=1. Cycle: ∑q(h)←{μq(1/σ2)W⊤W+μq(∑τ2,ω2−1)}−1 μq(h)←μq(1/σ2)∑q(h)W⊤(Y−Xμq(β)) μq(β)←(X⊤X)−1X⊤(Y−Wμq(h)) μq(1/σ2)←n+2a(Y−Xμq(β)−Wμq(h))⊤(Y−Xμq(β)−Wμq(h))+2γ μq(1/τt2)←{μq(λ12)μq(‖ht‖Gt2}1/2 μq(1/ωt2)←{μq(λ22)μq(∑n=1N(ht+1,n−ht,n)2)}1/2 μq(λ12)←⊤(n+1)+2r1∑t=1⊤μq(τt2)+2δ1 μq(λ22)←⊤−1+r212∑t=1⊤−1μq(ωt2)+δ2 until the increase in log{p_(y;q)} is negligible.