The TPSPLINE Procedure

MODEL Statement

  • MODEL dependent-variables = <regression-variables> (smoothing-variables)</ options>;

The MODEL statement specifies the dependent variables, the independent regression variables, which are listed with no parentheses, and the independent smoothing variables, which are listed inside parentheses.

The regression variables are optional. At least one smoothing variable is required, and it must be listed after the regression variables. No variables can be listed in both the regression variable list and the smoothing variable list.

If you specify more than one dependent variable, PROC TPSPLINE calculates a thin-plate smoothing spline estimate for each dependent variable by using the regression variables and smoothing variables specified on the right side.

If you specify regression variables, PROC TPSPLINE fits a semiparametric model by using the regression variables as the linear part of the model.

Table 103.3 summarizes the options available in the MODEL statement.

Table 103.3: MODEL Statement Options

Option

Description

ALPHA=

Specifies the significance level

DF=

Specifies the degrees of freedom

DISTANCE=

Defines a range in which points are treated as replicates

LAMBDA0=

Specifies the smoothing parameter

LAMBDA=

Specifies a set of values for the $\lambda $ parameter

LOGNLAMBDA0=

Specifies the smoothing parameter on the $\log _{10}(n\lambda )$ scale

LOGNLAMBDA=

Specifies a set of values for the $\lambda $ parameter on the $\log _{10}(n\lambda )$ scale

M=

Specifies the order of the derivative

RANGE=

Specifies the range for smoothing values to be evaluated


You can specify the following options in the MODEL statement:

ALPHA=number

specifies the significance level $\alpha $ of the confidence limits on the final thin-plate smoothing spline estimate when you request confidence limits to be included in the output data set. Specify number as a value between 0 and 1. The default value is 0.05. See the section OUTPUT Statement for more information about the OUTPUT statement.

DF=df

specifies the degrees of freedom of the thin-plate smoothing spline estimate, defined as

\[  \Argument{df}=\mr{tr}(\mb{A}(\lambda ))  \]

where $\mb{A}(\lambda )$ is the hat matrix. Specify df as a value between zero and the number of unique design points $n_ q$. Smaller $\Argument{df}$ values cause more penalty on the roughness and thus smoother fits.

DISTANCE=number
D=number

defines a range such that if the $L_{\infty }$ distance between two data points $(\mb{x}_ i, \mb{z}_ i)$ and $(\mb{x}_ j, \mb{z}_ j)$ satisfies

\[  \| \mb{x}_{i}-\mb{x}_{j}\| _{\infty } \leq D/2  \]

then these data points are treated as replicates, where $\mb{x}_ i$ are the smoothing variables and $\mb{z}_ i$ are the regression variables.

You can use the DISTANCE=  option to reduce the number of unique design points by treating nearby data as replicates. This can be useful when you have a large data set. Larger DISTANCE=  option values cause fewer $n_ q$ points. The default value is 0.

PROC TPSPLINE uses the DISTANCE=  value to group points as follows: The data are first sorted by the smoothing variables in the order in which they appear in the MODEL statement. The first point in the sorted data becomes the first unique point. Subsequent points have their values set equal to that point until the first point where the maximum distance in one dimension is larger than $D/2$. This point becomes the next unique point, and so on. Because of this sequential processing, the set of unique points differs depending on the order of the smoothing variables in the MODEL statement.

For example, with a model that has two smoothing variables (x1, x2), the data are first sorted by x1 and x2 (in that order), and then uniqueness is assessed sequentially. The first point in the sorted data $\mb{x}_1 = (\Variable{x1}_1,\Variable{x2}_1)$ becomes the first unique point, $\mb{u}_1 = (\Variable{u1}_1, \Variable{u2}_1)$. Subsequent points $\mb{x}_ i = (\Variable{x1}_ i,\Variable{x2}_ i)$ are set equal to $\mb{u}_1$ until the algorithm comes to a point with $\max (|\Variable{x1}_ i-\Variable{u1}_1|, |\Variable{x2}_ i-\Variable{u2}_1|) > D/2$. This point becomes the second unique point $\mb{u}_2$, and data sorting proceeds from there.

LAMBDA0=number

specifies the smoothing parameter, $\lambda _0$, to be used in the thin-plate smoothing spline estimate. By default, PROC TPSPLINE uses the $\lambda $ parameter that minimizes the GCV function for the final fit. The LAMBDA0=  value must be positive. Larger $\lambda _0$ values cause smoother fits.

LAMBDA=list-of-values

specifies a set of values for the $\lambda $ parameter. PROC TPSPLINE returns a GCV value for each $\lambda $ point that you specify. You can use the LAMBDA= option to study the GCV function curve for a set of values for $\lambda $. All values listed in the LAMBDA=  option must be positive.

LOGNLAMBDA0=number
LOGNL0=number

specifies the smoothing parameter $\lambda _0$ on the $\log _{10}(n\lambda )$ scale. If you specify both the LOGNL0=  and LAMBDA0=  options, only the value provided by the LOGNL0=  option is used. Larger $\log _{10}(n\lambda _0)$ values cause smoother fits. By default, PROC TPSPLINE uses the $\lambda $ parameter that minimizes the GCV function for the estimate.

LOGNLAMBDA=list-of-values
LOGNL=list-of-values

specifies a set of values for the $\lambda $ parameter on the $\log _{10}(n\lambda )$ scale. PROC TPSPLINE returns a GCV value for each $\lambda $ point that you specify. You can use the LOGNLAMBDA=  option to study the GCV function curve for a set of $\lambda $ values. If you specify both the LOGNL=  and LAMBDA=  options, only the list of values provided by the LOGNL=  option is used.

In some cases, the LOGNL=  option might be preferred over the LAMBDA=  option. Because the LAMBDA=  value must be positive, a small change in that value can result in a major change in the GCV value. If you instead specify $\lambda $ on the $\log _{10}(n\lambda )$ scale, the allowable range is enlarged to include negative values. Thus, the GCV function is less sensitive to changes in LOGNLAMBDA.

The DF=  option, LAMBDA0=  option, and LOGNLAMBDA0=  option all specify exact smoothness of a nonparametric fit. If you want to fit a model with specified smoothness, the DF=  option is preferable to the other two options because $(0,n_ q)$, the range of $\mr{df}$, is much smaller in length than $(0,\infty )$ of $\lambda $ and $(-\infty ,\infty )$ of $\log _{10}(n\lambda )$.

M=number

specifies the order of the derivative in the penalty term. The number must be a positive integer. The default value is $\max (2, \mr{int}(d/2)+1)$, where d is the number of smoothing variables.

RANGE=(lower, upper)

specifies that on the $\log _{10}(n\lambda )$ scale only smoothing values greater than or equal to lower and less than or equal to upper be evaluated to minimize the GCV function.