There are a few methods you can use to determine or assess the quality of the gridded data.

**Method 1: Use R ^{2} when Gridding with Polynomial Regression (Planar).**

The closest thing to a calculated goodness of fit is the Coefficient of Multiple Determination (R^{2}), but this is only calculated when gridding with planar regression, i.e. the first order polynomial. To calculate R^{2} with planar regression, follow these steps:

- Click
**Home |****Grid Data | Grid Data**, select the data file and click*Open*. - In the
**Grid Data**dialog, select the*Polynomial Regression*gridding method. - Click the
*Advanced Options*button. - In the
**Regression Advanced Options**, make sure the*Surface Definition*is set to*Simple planar**surface*. - Click
*OK*. - Set any other gridding parameters you wish.
- Make sure the
*Grid Report*check box is checked and click*OK*. - In the
**Grid Report**, a little more than halfway down, under the*Planar Regression*section, the*Coefficient of Multiple Determination (R^2)*value is displayed.

Surfer does not calculate the R-squared value for any polynomial order other than the first order. You can calculate the higher order R-squared values using the Grid Residuals option, described below.

**Method 2: Calculate Residuals and R ^{2} Value.**

If you want to compare a “goodness-of-fit” for the gridding methods (to see how well the grid honors the original data points), you might consider using **Grids | Calculate | Residuals **instead. The **Grids | Calculate | Residuals** calculation returns the differences between the calculated grid and the actual data values. A sum the squares of the residuals can be used to compare gridding methods, with smaller values indicating better goodness-of-fit.

- Click
**Home |****Grid Data | Grid Data**, select the data file and click*Open*. - Choose any gridding parameters you wish and click
*OK*. The grid file is created. - Click
**Grids | Calculate | Residuals**, select the grid file just created and click*Open*, - Select the data file containing the original data points and click
*Open*, - Choose the column in the worksheet to contain the calculated residual values.
- Click
*OK*and the data file opens in the worksheet and the residuals are displayed in the designated column. Lower residual values indicate a better fit with the original data.

Once you have the residuals, you can either:

- Save the data and create a classed post map using the residuals as the Z column. Apply different colored symbols to display the different amounts of errors.
- Generate a single value, such as the sum of the squares of the residuals, to represent the residuals of the entire gridded surface.
- When viewing the data in the worksheet, click
**Data |****Data | Transform.** - Square the residuals data by entering the function:
*E=D*D*(where D is the column letter containing the residuals and E is an empty column). Click*OK*and the data is calculated*.* - Find the sum the squares of the residuals by selecting the column containing the square of the residuals and clicking
**Data |****Data | Statistics**. - Make sure
*Sum*is checked and click*OK*. The*Sum*is displayed. Compare this result with the result for other grids and their residuals. A smaller value indicates less error.

- When viewing the data in the worksheet, click
- Calculate R
^{2}, an indication of the goodness of fit of the model, with the equation: R^{2}= 1 - (SS_{res}/ SS_{tot}).

Where:

SS

_{res}= Sum of the squares of the residuals.SSt

_{ot}= Sum of squares of the differences from the mean, S(Z_{i}- Z_{mean})^{2}.

After calculating the residuals, calculate a new column containing the squares of the residuals (SS_{res}):- When viewing the data in the worksheet, click
**Data | Data | Transform**. - Square the residuals data by entering the function:
*E=D*D*(where D is the column letter containing the residuals and E is an empty column). Click*OK*and the data is calculated. - Find the sum the squares of the residuals by selecting the column containing the square of the residuals and clicking
**Data | Data | Statistics**. - In the
**Statistics**dialog, only have*Sum*checked in the list of items to compute, and in the*Results*section choose*Show in a window*. - In the
**Statistics Results**window, click the*Copy*button and click*Close*. - Select an empty cell at the bottom of the square residuals column and click
**Home | Clipboard****| Paste**. This is SS_{res}.

Then, calculate SS_{tot}:- Calculate the Z
_{mean}by selecting the Z column (often column C), choosing**Data | Data | Statistics**. Check*Mean*in the list of items to compute and click*OK*. Write down the*Mean*value (Z_{mean}) and click*Close*. - Calculate Z
_{i}- Z_{mean}by clicking**Data | Data | Transform**, entering the function:*F = C - Z*, where F is the next empty column._{mean} - Calculate (Z
_{i}- Z_{mean})^{2}by clicking**Data |****Data | Transform**, entering the function:*G = F*F*, where G is the next empty column. - Sum (Z
_{i}- Z_{mean})^{2}by selecting column G (or whatever column the square of the data is in), and clicking**Data | Data | Statistics**. - In the
**Statistics**dialog, only have*Sum*checked in the list of items to compute, and in the*Results*section choose*Show in a window*. - In the
**Statistics Results**window, click the*Copy*button and click*Close*. - Select an empty cell at the bottom of the square Z column and click
**Home | Clipboard****| Paste**. This is SS_{tot}.

- When viewing the data in the worksheet, click

Use a calculator to calculate R^{2 }: 1 - (SS_{res} / SS_{tot})

**Method 3: Cross Validate the Data.**

Another method to assess the quality of the grid is to cross validate the grid with the data. Cross validation can be considered an objective method of assessing the quality of a gridding method, or to compare the relative quality of two or more candidate gridding methods.

Cross validation calculates the differences in the grid file when data points are omitted. You can access this feature by following these steps:

- Click
**Home |****Grid Data | Grid Data**, select the data file and clicking*Open*. - In the
**Grid Data**dialog, select the gridding parameters you wish. - Click the
*Cross Validate*button. - Enter the cross validation parameters you wish, and note the file path and name of the cross validation results file.
- Click
*OK*and the cross validate results file is created.

This method is mostly designed to measure how well a data point value is predicted by the surrounding data points, so other goodness-of-fit methods may be more appropriate if your data is spiky or has high variability between data points.

**Method 4: Create a ****Grid of Kriging Standard Deviations.**

You can generate a standard deviation grid with the Kriging gridding method. Note that this is more geared towards experienced variogram modelers. There are several cases where a standard deviation grid is incorrect or meaningless, so please see the Kriging help topic for more information.

To create the Kriging Standard Deviation grid, follow these steps:

- Click
**Home |****Grid Data | Grid Data**, select the data file and clicking*Open*. - In the
**Grid Data**dialog, select the*Kriging*gridding method. - Click the
*Advanced Options*button. - On the
**Genera**l page, click the C*hange Filename*button to the right of*Output Grid of Kriging Standard Deviations*. - Give the file a name and click
*Save*. - Click
*OK*. - Enter any other gridding options you wish and click
*OK*. The grid is created.

From here, you can create a map and view the areas with high or low standard deviations.

*Updated February 2, 2017*

## 0 Comments