Skip to content
Prev 1861 / 29559 Next

Principal Directions with surf.ls

On Wed, 14 Mar 2007, Gabor Grothendieck wrote:

            
There is one extra step that is necessary. It has been known since the 
1970's (D. Unwin, also Brian Ripley's 1981 book) that if the northings are 
in metres north of the equator, numerical problems cut in very fast when 
using trend surface, because the powers become very large numbers. 
Typically, for a small site, there will be no difference between y^2 and 
y^3, say, from the point of view of the computer. 

So the coordinates need to be scaled so that they do not explode, and both
the functions in spatial and in gstat for trend surface do this, in
surf.ls() by transforming both x and y coordinates to lie between +/-1.
Other than that, lm() ought to be fine. For blocks, it may be sufficient
just to go from m to km as the unit.

Roger