# Thread: Where are coefficients for global polynomial interpolation?

1. ## Where are coefficients for global polynomial interpolation?

After producing a geostatistical layer using global polynomial interpolation using, for example, the Geostatistical Wizard, how can I access the actual coefficients for the n'th order polynomial that the Wizard produces. Clearly, these coefficients are stored in the ArcMap geostatistical layer, but I can't find any method (the generic sense) to access them. In addition, I can't find the format of the layer file in order to access them with a binary file reader.

I notice that for some kinds of regressions in Spatial Analyst, the coefficients can be outputted to a file when using Arcpy. Howevr, I have not found any facility to get at the coefficients produced for global polynomial interpolation in Geostatistical Wizard. The only information on the polynomial that the Wizard outputs at the end is the order of the polynomial which in actually an input.

Does anyone know how to do this?

2. ## Re: Where are coefficients for global polynomial interpolation?

You're right, it doesn't print the GPI equation anywhere in the Wizard or the gp tool. This is a good catch, and we may add that enhancement in the future. Thanks for pointing it out.

However, you can calculate the equation fairly easily. GPI is just doing Ordinary Least Squares using the coordinates as predictor variables. So, you can use the Ordinary Least Squares tool in the Spatial Statistics toolbox to calculate the coefficients. If you're using a second-order polynomial, you'll need to calculate X, Y, X^2, Y^2, and X*Y and use them as predictor variables. For even higher-order polynomials, you'll need to calculate all the high-order terms and interactions.

The OLS tool only prints the first 6 decimal places of the coefficient, but the coefficient will often be smaller than 10^(-6) if you're in a small map unit (like meters), so it will just appear as 0.000000. If the OLS tool doesn't print enough digits by default, there's another technique that will work:

In the OLS tool, under "Additional Options" at the bottom of the tool, you can create a optional Coefficient Output Table as a dbf file. After running the tool, add the dbf file to ArcMap, and open the table. As shown in the attached graphic, right-click the "Coef" field and choose "Properties". Click the "Numeric" button (highlighted in green in the graphic), and you can set the number of decimal places to as high as you need.

Sorry for having to resort to a work-around, and thanks again for bringing this to our attention.