Many inferential tasks involve fitting models to observed data and predicting outcomes at new covariate values, requiring interpolation or extrapolation. Conventional methods select a single best-fitting model, discarding fits that were similarly plausible in-sample but would yield sharply different predictions out-of-sample. Gaussian Processes (GPs) offer a principled alternative. Rather than committing to one conditional expectation function, GPs deliver a posterior distribution over outcomes at any covariate value. This posterior effectively retains the range of models consistent with the data, widening uncertainty intervals where extrapolation magnifies divergence. In this way, the GP's uncertainty estimates reflect the implications of extrapolation on our predictions, helping to tame the "dangers of extreme counterfactuals" (King & Zeng, 2006). The approach requires (i) specifying a covariance function linking outcome similarity to covariate similarity, and (ii) assuming Gaussian noise around the conditional expectation. We provide an accessible introduction to GPs with emphasis on this property, along with a simple, automated procedure for hyperparameter selection implemented in the R package gpss. We illustrate the value of GPs for capturing counterfactual uncertainty in three settings: (i) treatment effect estimation with poor overlap, (ii) interrupted time series requiring extrapolation beyond pre-intervention data, and (iii) regression discontinuity designs where estimates hinge on boundary behavior.
翻译:许多推断任务涉及将模型拟合到观测数据并在新的协变量值处预测结果,这需要进行插值或外推。传统方法选择单一最佳拟合模型,舍弃那些在样本内具有类似合理性但在样本外会产生显著不同预测的拟合结果。高斯过程提供了一种原则性的替代方案。它并非固定于一个条件期望函数,而是给出任意协变量值处结果的后验分布。该后验分布有效地保留了与数据一致的一系列模型,并在外推放大分歧的区域扩展不确定性区间。通过这种方式,高斯过程的不确定性估计反映了外推对我们预测的影响,有助于抑制“极端反事实的危险”。该方法需要:(i) 指定一个将结果相似性与协变量相似性相关联的协方差函数;(ii) 假设条件期望周围存在高斯噪声。我们提供了一个侧重于此特性的高斯过程入门介绍,以及一个在R包gpss中实现的简单、自动化的超参数选择流程。我们通过三个场景说明高斯过程在捕捉反事实不确定性方面的价值:(i) 重叠较差时的处理效应估计,(ii) 需要基于干预前数据进行外推的间断时间序列,以及(iii) 估计依赖于边界行为的断点回归设计。