The GAM Procedure

Confidence Intervals for Smoothers

Buja, Hastie, and Tibshirani (1989) showed that each smoothing function estimate from the backfitting algorithm is the result of a linear mapping applied to the working response, if the backfitting algorithm converges.

The smoothing function estimate can be expressed as

where bold x Subscript j is the jth covariate and bold z is the adjusted dependent variable that is formed in the local scoring algorithm. If the errors are independent and identically distributed, then

where sigma squared equals normal upper V normal a normal r left-parenthesis bold z right-parenthesis.

However, direct computation of bold upper H Subscript j is formidable within the backfitting framework. Hastie and Tibshirani (1990) proposed using each individual smoothing matrix bold upper A Subscript j Baseline left-parenthesis lamda Subscript j Baseline right-parenthesis as a substitute for the linear operator bold upper H Subscript j when computing confidence intervals. In the GAM procedure, curvewise confidence intervals for smoothing splines and pointwise confidence intervals for loess are provided in the output data set.

Curvewise Confidence Interval for Smoothing Spline Smoothers

Viewing the spline model as a Bayesian model, Wahba (1983) proposes Bayesian confidence intervals for smoothing spline estimates as:

where ModifyingAbove bold upper V With caret Subscript i i Baseline left-parenthesis lamda right-parenthesis is the ith diagonal element of the Bayesian posterior covariance matrix ModifyingAbove bold upper V With caret and z Subscript alpha slash 2 is the 1 minus alpha slash 2 quantile of the standard normal distribution. The confidence intervals are interpreted as intervals "across the function" as opposed to pointwise intervals.

Suppose that you fit a spline estimate to experimental data that consist of a true function f and a random error term epsilon Subscript i. In repeated experiments, it is likely that about 100 left-parenthesis 1 minus alpha right-parenthesis percent-sign of the confidence intervals cover the corresponding true values, although some values are covered every time and other values are not covered by the confidence intervals most of the time. This effect is more pronounced when the true response curve or surface has small regions of particularly rapid change.

In the GAM procedure, let the smoothing matrix for the nonlinear part of the jth spline term be bold upper A overTilde Subscript j after the linear part is separated out from bold upper A Subscript j Baseline left-parenthesis lamda right-parenthesis. The Bayesian posterior variance for the nonlinear part is computed as

where ModifyingAbove phi With caret is the dispersion parameter estimate and bold upper W is the weight matrix from the final local scoring iteration. If you specify UCLM, LCLM, ADIAG, and STD options in the OUTPUT statement, the statistics are derived based on ModifyingAbove bold upper V With caret Subscript j.

When you request both the ADDITIVE and CLM suboptions in the PLOTS=COMPONENTS option, each of the smoothing component plots displays a confidence band for the total contribution of each smoothing spline smoother. The confidence band is derived from the total variance that is contributed by both linear and nonlinear parts by the jth term

Pointwise Confidence Interval for Loess Smoothers

As shown in Cleveland, Devlin, and Grosse (1988), the smoothing matrix bold upper A left-parenthesis lamda right-parenthesis for a loess smoother is asymmetric. The confidence intervals are computed as follows:

where ModifyingAbove bold upper V With caret Subscript i i Baseline left-parenthesis lamda right-parenthesis is the ith diagonal element of the covariance matrix ModifyingAbove bold upper V With caret and z Subscript alpha slash 2 is the 1 minus alpha slash 2 quantile of the standard normal distribution.

In the GAM procedure, let the smoothing matrix for the nonlinear part of the jth loess term be bold upper A overTilde Subscript j after the linear part is separated out from bold upper A Subscript j Baseline left-parenthesis lamda right-parenthesis. The covariance matrix for the nonlinear part is then

where ModifyingAbove phi With caret is the dispersion parameter estimate and bold upper W is the weight matrix from the final local scoring iteration. If you specify UCLM, LCLM, and STD options in the OUTPUT statement, the statistics are derived based on ModifyingAbove bold upper V With caret Subscript j.

When you request both the ADDITVE and CLM suboptions in the PLOTS=COMPONENTS option, each of the smoothing component plots displays confidence intervals for total prediction of each loess smoother. The confidence intervals are derived from the total variance that is contributed by both the linear and nonlinear parts by the jth term

Last updated: October 28, 2020