[论文解读] cgam: An R Package for the Constrained Generalized Additive Model
本文介绍了 R 包 cgam,该包使用锥投影方法拟合受约束的广义可加模型,以强制执行单调性、凸性以及光滑分量的顺序等形状约束。该方法通过迭代加权锥投影高效估计模型,相比 scam 等竞争方法计算速度更快,在无需可加性假设的情况下准确拟合复杂形状约束曲面,展现出显著的速度优势。
The cgam package contains routines to fit the generalized additive model where the components may be modeled with shape and smoothness assumptions. The main routine is cgam and nineteen symbolic routines are provided to indicate the relationship between the response and each predictor, which satisfies constraints such as monotonicity, convexity, their combinations, tree, and umbrella orderings. The user may specify constrained splines to fit the components for continuous predictors, and various types of orderings for the ordinal predictors. In addition, the user may specify parametrically modeled covariates. The set over which the likelihood is maximized is a polyhedral convex cone, and a least-squares solution is obtained by projecting the data vector onto the cone. For generalized models, the fit is obtained through iteratively re-weighted cone projections. The cone information criterion is provided and may be used to compare fits for combinations of variables and shapes. In addition, the routine wps implements monotone regression in two dimensions using warped-plane splines, without an additivity assumption. The graphical routine plotpersp will plot an estimated mean surface for a selected pair of predictors, given an object of either cgam or wps. This package is now available from the Comprehensive R Archive Network at http://CRAN.R-project.org/package=cgam.
研究动机与目标
- 开发一个计算高效的 R 包,用于拟合具有单调性、凸性及顺序等形状约束的广义可加模型。
- 通过支持无需依赖惩罚样条或后向拟合的快速约束平滑,解决现有包(如 scam 和 mgcv)的局限性。
- 提供一个类似于 mgcv 的 gam 函数的统一接口,允许用户使用直观的语法(如 s.incr(x))指定形状约束光滑项。
- 支持连续和有序预测变量,并具备多种约束类型,包括树状和雨伞形顺序。
- 提供基于锥信息准则的模型比较工具,以及通过扭曲平面样条(wps)可视化双变量效应的方法。
提出的方法
- 该包使用受约束样条——单调性使用二次 I-样条,凸性使用三次 C-样条——其中形状约束通过将系数限制为非负值来实现。
- 主要拟合例程 cgam 将响应向量投影到由形状约束定义的多面凸锥上,通过活动集算法求解最小二乘问题。
- 对于广义线性模型,采用迭代加权锥投影方法,在相同约束下最大化似然函数。
- wps 函数使用扭曲平面样条在不假设可加性的前提下拟合双变量单调曲面,支持非可加形状约束回归。
- 使用锥信息准则(CIC)比较具有不同变量组合与形状约束的模型。
- 图形函数如 plotpersp 可可视化选定预测变量对的估计均值曲面,辅助模型解释。
实验结果
研究问题
- RQ1如何在保持计算速度与统计精度的前提下,高效地在 R 中估计形状约束可加模型?
- RQ2锥投影方法在拟合单调或凸光滑分量时,是否能优于后向拟合或惩罚样条方法?
- RQ3与无约束替代方案相比,受约束模型在非可加设定下对真实世界数据的拟合效果如何?
- RQ4在存在复杂预测变量-响应关系的情况下,形状约束在多大程度上提升了模型拟合度与可解释性?
- RQ5该包能否处理连续和有序预测变量,并支持包括树状与雨伞形顺序在内的多种顺序约束?
主要发现
- 在模拟研究中,cgam 包的计算速度显著快于 scam 包:当 n=100 时,分别为 17 秒与 611 秒;当 n=500 时,分别为 58 秒与 842 秒。
- 锥信息准则(CIC)能有效比较具有不同形状约束与变量组合的模型,支持模型选择。
- wps 函数成功拟合了二维双递减曲面,且无需假设可加性,这在 plasma 数据集上的 CIC 值为 5.02 得到了验证。
- 该包正确识别出可加模型已足够合适,因为其 CIC(4.97)与非可加模型(5.02)相近,支持模型简洁性。
- 当拟合双单调但非均匀递增的曲面时,cgam 包优于 scam,因为 scam 的约束过于严格,无法捕捉增长率的变化。
- 该包通过基函数约束支持广泛的形状约束(包括单调性与凸性的组合),实现灵活且可解释的建模。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。