Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Spline interpolation of spatial data


From   Gordon Hughes <[email protected]>
To   [email protected]
Subject   st: Spline interpolation of spatial data
Date   Tue, 10 Jan 2012 12:02:44 +0000

Dear Statalist,

I would be grateful for suggestions about whether there are any routines in Stata - or other software - to carry out a rather specific form of spline surface interpolation. The context is fairly common with GIS raster data: I have multiple sets of spatial data at different grid resolutions which I want to combine to form weighted averages. Assuming a uniform distribution over the coarser grid units may introduce errors of unknown magnitude that I would like to examine.

As a concrete example, I have average temperatures for 1 deg grid cells covering the continental US. In addition, I have estimates of total population by 30 arc-second grid cells for the same area. I want to calculate estimates of population-weighted temperature exposure by state and/or county. If population density and/or temperature distribution are not uniform within each 1 deg grid cell, the simple procedure of summing the population in each 1 deg cell and then computing population-weighted average temperatures by state fails to allow for the non-uniform distribution of population and/or temperature.

A better approach would be to convert each 1 deg grid cell to a 12 x 12 (5 arc-min) mesh and use cubic or some other spline surfaces to interpolate temperatures over this mesh subject to a constraint on the average temperature for the whole grid cell and on knots at the boundary points. This is a non-trivial exercise and I cannot locate any Stata routines that do anything like this. There are monographs in mathematics and computational graphics that cover the general topic - notably a monograph by Paul Dierckx titled 'Curve and surface fitting with splines' (Clarendon Press, 1993). In addition, there are specialised algorithms that are used in 3D graphical software, though generally these focus on interpolation of points rather than averages. Some of Dierckx's algorithms - originally in Fortran and called FitPack - have been translated into R and Python, but these are not easy to convert to Stata or Mata.

Does anyone have any suggestions of routines in either Stata or Matlab or some other matrix language that might provide a starting point for spatial interpolation of this kind?

Gordon Hughes
[email protected]
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index