# The GAMPL Procedure

### Tests for Smoothing Components

The GAMPL procedure performs a smoothing component test on the null hypotheses for the jth component. In contrast to the analysis of deviance that is used in PROC GAM (which tests existence of nonlinearity for each smoothing component), the smoothing component test used in PROC GAMPL tests for the existence of a contribution for each smoothing component.

The hypothesis test is based on the Wald statistic. Define as the matrix of all zeros except for columns that correspond to basis expansions of the jth spline term. Then the column vector of predictions is , and the covariance matrix for the predictions is . The Wald statistic for testing is

where is the rank-r pseudo-inverse of . If is the Cholesky root for such that , then the test statistic can be written as

Wood (2012) proposes using the degrees of freedom for test (which is defined in the section Degrees of Freedom) as the rank r. Because spline terms in fitted models often have noninteger degrees of freedom, the GAMPL procedure uses a rounded value of as the rank:

Let K be a symmetric and nonnegative definite matrix, and let its eigenvalues be sorted as ; then the rank-r pseudo-inverse of K is formed by

where are formed by columns of eigenvectors that correspond to the r eigenvalues.

Under the null hypothesis, the Wald statistic approximately follows the chi-square distribution . For an observed test statistic , the p-value for rejecting the null hypothesis is computed as if the dispersion parameter is constant, or with error degrees of freedom if the dispersion parameter is estimated.

Be cautious when you interpret the results of the smoothing component test because p-values are computed by approximation and the test does not take the smoothing parameter selection process into account.