Skip to main content
. Author manuscript; available in PMC: 2022 Sep 30.
Published in final edited form as: Stat Med. 2021 Jun 15;40(22):4850–4871. doi: 10.1002/sim.9099

Algorithm 1.

Out-of-sample MSE and predictive MSE.

1. Obtain posterior samples {θs}s=1Sp(θ|y);
2. For each holdout set k = 1, …, K:
 (a) Compute the (log) weights, logWks=clogp(yIk|θs)=iIklogp(yi|θs) using the (Gaussian) log-likelihood in (1), where =c denotes equality up to a constant;
 (b) Estimate β^Iks=1SβsWks and ω_j=s=1SWks|βjs|γ;
 (c) Set y^jIk=x~jβ^IkforjIk;
 (d) Compute δ^λIk by solving (22) for each λ;
 (e) Sample {y~is*}s*=1S~ from p(y~i|yIk) using the SIR algorithm for iIk;
3. Compute MSEλout using δ^λIk and MSE~λout using δ^λIk and {y~is*}s*=1S~ in (17).