Follow

How can I assess the quality of the gridded data in Surfer, or estimate the goodness of fit?

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

 

Method 1: Use R2 when Gridding with Polynomial Regression (Planar).

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

  1. Click Home | Grid Data | Grid Data, select the data file and click Open.
  2. In the Grid Data dialog, select the Polynomial Regression gridding method.
  3. Click the Advanced Options button.
  4. In the Regression Advanced Options, make sure the Surface Definition is set to Simple planarsurface.
  5. Click OK.
  6. Set any other gridding parameters you wish.
  7. Make sure the Grid Report check box is checked and click OK.
  8. 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 R2 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.

  1. Click Home | Grid Data | Grid Data, select the data file and click Open.
  2. Choose any gridding parameters you wish and click OK. The grid file is created.
  3. Click Grids | Calculate | Residuals, select the grid file just created and click Open,
  4. Select the data file containing the original data points and click Open,
  5. Choose the column in the worksheet to contain the calculated residual values. 
  6. 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:

  1. 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. 
  2. Generate a single value, such as the sum of the squares of the residuals, to represent the residuals of the entire gridded surface.
    1. When viewing the data in the worksheet, click Data | Data | Transform.
    2. 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.
    3. Find the sum the squares of the residuals by selecting the column containing the square of the residuals and clicking Data | Data | Statistics.
    4. 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.
  3. Calculate R2, an indication of the goodness of fit of the model, with the equation:  R2 = 1 - (SSres / SStot).

    Where:

    SSres = Sum of the squares of the residuals.

    SStot = Sum of squares of the differences from the mean, S(Zi - Zmean)2.


    After calculating the residuals, calculate a new column containing the squares of the residuals (SSres):

    1. When viewing the data in the worksheet, click Data | Data | Transform.
    2. 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.
    3. Find the sum the squares of the residuals by selecting the column containing the square of the residuals and clicking Data | Data | Statistics.
    4. 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.
    5. In the Statistics Results window, click the Copy button and click Close.
    6. Select an empty cell at the bottom of the square residuals column and click Home | Clipboard | Paste.  This is SSres.

     
    Then, calculate SStot:

    1. Calculate the Zmean 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 (Zmean) and click Close.
    2. Calculate Zi - Zmean by clicking Data | Data | Transform, entering the function: F = C - Zmean, where F is the next empty column.
    3. Calculate (Zi - Zmean)2 by clicking Data | Data | Transform, entering the function: G = F*F, where G is the next empty column.
    4. Sum (Zi - Zmean)2 by selecting column G (or whatever column the square of the data is in), and clicking Data | Data | Statistics.
    5. 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.
    6. In the Statistics Results window, click the Copy button and click Close.
    7. Select an empty cell at the bottom of the square Z column and click Home | Clipboard | Paste. This is SStot.


Use a calculator to calculate R2 :  1 - (SSres / SStot)

 

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:

  1. Click Home | Grid Data | Grid Data, select the data file and clicking Open.
  2. In the Grid Data dialog, select the gridding parameters you wish.
  3. Click the Cross Validate button. 
  4. Enter the cross validation parameters you wish, and note the file path and name of the cross validation results file.
  5. 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:

  1. Click Home | Grid Data | Grid Data, select the data file and clicking Open.
  2. In the Grid Data dialog, select the Kriging gridding method.
  3. Click the Advanced Options button. 
  4. On the General page, click the Change Filename button to the right of Output Grid of Kriging Standard Deviations.
  5. Give the file a name and click Save.
  6. Click OK.
  7. 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

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.