Skip to main content
. Author manuscript; available in PMC: 2024 Sep 26.
Published in final edited form as: Biom J. 2023 Apr 5;65(5):e2100359. doi: 10.1002/bimj.202100359

ALGORITHM 2.

Monte Carlo sensitivity analysis: confidence intervals

1: Calculate p^K=n𝕀{n(HK,ψTψ^Kadj)2HK,ψTΣ^ψKHK,ψχ1,1ν2} where Σ^ψK denotes an estimate of nCov(ψ^K,ψ^K)
2: Calculate resample size m^K=n1+κ(1p^K)1+κ
3: for k=K1,,1 do
4:  Draw B bootstrap samples of size m^k
5:  Estimate ψ^k,m^kadj,(b) for b=1,,B
6:  For each given Hk,ψ=hk,ψ, construct a confidence interval for hk,ψTψkadj
7:  Calculate p^k by the proportion of confidence intervals for hk,ψTψkadj that contain zero
8:  Calculate the resample size m^k=n1+κ(1pk)1+κ
9: end for
10: Calculate p^=maxkp^k and m^=n1+κ(1p)1+κ
11: Draw B bootstrap sample of size m^
12: Estimate ψ^k,m^adj,(b) for k=K,,1, b=1,,B
13: Calculate ϑk/2×100 and (1ϑk/2)×100 percentiles of m^(ψ^k,m^adj,(b)ψ^kadj) which we denote by l^k and u^k respectively for k=1,,K
14: Calculate a confidence interval for ψk by (ψ^kadju^k/m^,ψ^kadj+l^k/m^) for k=K,,1