Specifies the three numeric variables for interpolation
or for smoothing. Can also specify the number of observations (x and y values), in the output data set; output values for the two horizontal
variables x-y; and the interpolation
method for the vertical variables.

Requirement: | Exactly one grid request is required. |

GRID grid-request </option(s)>;

grid-request must be:

y*x=z(s)

Grid options

specifies a list of numeric values to assign to
the first (y) variable in the
grid request for the output data set.

specifies a list of numeric values to assign to
the second (x) variable in
the grid request for the output data set.

specifies the number of values for the first (y) variable in the grid request for the output
data set.

specifies the number of values for the second (x) variable in the grid request for the output
data set.

Interpolation options

uses a linear interpolation within a set of triangular
regions that are formed from the input data set.

specifies the number of the nearest data points
to use for computing the estimates of the first derivative, and the
second derivative.

specifies that the x and y variables not be scaled
to the same range before interpolation.

specifies that a spline be used to estimate the
derivatives for the biquintic polynomial interpolation.

specifies that the x and y variables be scaled
to the same range before interpolation.

specifies a list of numbers for smoothing parameters.

specifies the use of a bivariate spline (Harder
and Desmarais 1972, Meinguet 1979, Green and Silverman 1994) to interpolate,
or to form a smoothed estimate, if you also use the SMOOTH= option.

- AXIS1=ascending-value-list
- specifies a list of numeric values to assign to the first (y) variable in the grid request for the output data set. Numbers that you specify with this option determine the number of values for y, and override a value that you specify with the NAXIS1= option. The ascending-value-list must be arranged in ascending order. The value list can be in any of the following forms:

- AXIS2=ascending-value-list
- specifies a list of numeric values to assign to the second (x) variable in the grid request for the output data set. Numbers that you specify with this option determine the number of values for x and override a value that you specify with the NAXIS2= option. The ascending-value-list must be arranged in ascending order. The value list can be in any of the following forms:

- JOIN
- uses a linear interpolation within a set of triangular regions that are formed from the input data set. This interpolation method creates values in the range of the initial values of the vertical variable, but the resulting interpolated surface might not be smooth.

- NAXIS1=n
- specifies the number of values for the first (y) variable in the grid request for the output
data set. You can determine the
actual values used for y by
taking the minimum and the maximum values of y and dividing the range into n- one equal sections.
Default:11

- NAXIS2=n
- specifies the number of values for the second (x) variable in the grid request for the output
data set. You can determine the
actual values that are used for x by taking the minimum value and the maximum value of x, and dividing the range into n- one equal sections.
Default:11

- NEAR=n
- specifies the number of the nearest data points
to use for computing the estimates of the first derivative, and the
second derivative. As NEAR= values become
larger, time and computation costs increase significantly. NEAR= is
ignored if you specify SPLINE. The value of n must be greater than or equal to 3.If the number of input data points is insufficient for the number that you specify with NEAR=, a smaller number of data points is used.Default:3Example:Partial Spline Interpolation

- NOSCALE
- specifies that the x and y variables not be scaled
to the same range before interpolation. By default, the interpolation
is performed after both variables are similarly scaled because the
interpolation methods assume that the scales of x and y are comparable.Default:SCALE

- PARTIAL
- specifies that a spline be used to estimate the
derivatives for the biquintic polynomial interpolation. A bivariate spline
is fit to the nearest neighbors, and is used to estimate the needed
derivatives. This option produces results that are less smooth than
those produced by the SPLINE option and uses fewer computer resources.
However, the results produced by PARTIAL are smoother than those that
are produced by the default. If you use both the PARTIAL option and
the SPLINE option, the PARTIAL option is ignored.Example:Partial Spline Interpolation

- SCALE
- specifies that the x and y variables be scaled
to the same range before interpolation. The interpolation is
performed after both variables are similarly scaled because the interpolation
methods assume that the scales of x and y are comparable.Default:SCALE

- SMOOTH=ascending-value-list
- specifies a list of numbers for smoothing parameters. Use the SMOOTH= option
only when you also use the SPLINE option. The ascending-value-list must be arranged in ascending order. The value list can be in any
of the following forms:
datapoints, and the pairs (x
_{j}, y_{j }) are the available points, with corresponding function values z_{j}(Wahba 1990).The higher the value of the smoothing parameter, the smoother the resulting interpolation. The lower the smoothing parameter, the closer the resulting surface is to the original data points. A smoothing parameter of 0 produces the same results as the SPLINE option without the SMOOTH= option.This procedure repeats for each value of the smoothing parameter. The output data set that you specify in the OUT= option contains:

- SPLINE
- specifies the use of a bivariate spline (Harder
and Desmarais 1972, Meinguet 1979, Green and Silverman 1994) to interpolate,
or to form a smoothed estimate, if you also use the SMOOTH= option. The SPLINE option results
in the use of an order n
^{3}algorithm, where n is the number of input data points. Consequently, this method can be time-consuming. If you use more than 100 input points, the procedure can use excessive time.

The G3GRID procedure
produces a data set with 121 observations for combinations of eleven
values for each of the horizontal variables, x and y. To create a data set
with a different number of observations, use the GRID statement's
NAXIS1= option, or the NAXIS2= option to specify the number of the
values of y or x, respectively. You can use the GRID statement's
AXIS1= option or the AXIS2= option to specify the actual values for y or x, respectively.

The following table
shows the number of observations that will be in the output data set
if you use any of these options.

If you specify multiple
smoothing parameters, the number of observations in the output data
set will be the number shown in the table, multiplied by the number
of smoothing values that you specify in the SMOOTH= option. If you
use BY-group processing, multiply the number in the table by the number
of BY groups.