Extant "fast" algorithms for Monte Carlo confidence sets are limited to univariate shift parameters for the one-sample and two-sample problems using the sample mean as the test statistic; moreover, some do not converge reliably and most do not produce conservative confidence sets. We outline general methods for constructing confidence sets for real-valued and multidimensional parameters by inverting Monte Carlo tests using any test statistic and a broad range of randomization schemes. The method exploits two facts that, to our knowledge, had not been combined: (i) there are Monte Carlo tests that are conservative despite relying on simulation, and (ii) since the coverage probability of confidence sets depends only on the significance level of the test of the true null, every null can be tested using the same Monte Carlo sample. The Monte Carlo sample can be arbitrarily small, although the highest nontrivial attainable confidence level generally increases as the number $N$ of Monte Carlo replicates increases. We present open-source Python and R implementations of new algorithms to compute conservative confidence sets for real-valued parameters from Monte Carlo tests, for test statistics and randomization schemes that yield $P$-values that are monotone or weakly unimodal in the parameter, with the data and Monte Carlo sample held fixed. In this case, the new method finds conservative confidence sets for real-valued parameters in $O(n)$ time, where $n$ is the number of data. The values of some test statistics for different simulations and parameter values have a simple relationship that makes more savings possible.
翻译:现有用于蒙特卡洛置信集的“快速”算法仅限于使用样本均值作为检验统计量的单样本和双样本问题中的单变量位移参数;此外,部分算法收敛不可靠,且大多数无法生成保守的置信集。我们概述了通过反转蒙特卡洛检验来构建实值和多维参数置信集的通用方法,该方法可使用任意检验统计量和广泛的随机化方案。此方法利用了据我们所知尚未被结合的两个事实:(i) 存在尽管依赖模拟但仍保持保守性的蒙特卡洛检验;(ii) 由于置信集的覆盖概率仅取决于真实零假设检验的显著性水平,每个零假设均可使用相同的蒙特卡洛样本进行检验。蒙特卡洛样本可任意小,尽管可达到的最高非平凡置信水平通常随蒙特卡洛重复次数$N$增加而提高。我们提出了新算法的开源Python和R实现,用于从蒙特卡洛检验计算实值参数的保守置信集,适用于在数据和蒙特卡洛样本固定的条件下,能产生关于参数单调或弱单峰$P$值的检验统计量和随机化方案。在此情况下,新方法可在$O(n)$时间内找到实值参数的保守置信集,其中$n$为数据量。不同模拟和参数值下某些检验统计量间的简单关系使得进一步节省计算成为可能。