| Library: | spatial |
| See also: | SPKRsurfgls SPKRexpcov SPKRgaucov SPKRsphercov SPKRtrmat SPKRprmat SPKRsemat SPKRcorrelogram SPKRvariogram SPKRmultcontours |
| Quantlet: | SPKRsurfls | |
| Description: | Fits a trend surface, i.e., a polynomial regression surface, by least squares. |
| Usage: | myres = SPKRsurfls (np, xmat) | |
| Input: | ||
| np | scalar - degree of the polynomial surface, an integer in the range 0..6 | |
| xmat | n x 3 - matrix of locations (x_i, y_i) [columns 1 & 2] and observations z_i [column 3] | |
| Output: | ||
| res | list - consisting of components x, y, z, np, f, r, beta, wz, minx, maxx, type -- | |
| x | n x 1 - same as xmat[,1] | |
| y | n x 1 - same as xmat[,2] | |
| z | n x 1 - same as xmat[,3] | |
| np | scalar - same as input value np | |
| f | matrix - internal use only | |
| r | matrix - internal use only | |
| beta | matrix - (np + 1)(np + 2) / 2 coefficients | |
| wz | matrix - internal use only | |
| minx | 1 x 3 - minimum of columns of xmat | |
| maxx | 1 x 3 - maximum of columns of xmat | |
| type | string - "trls" | |
; load the spatial statistics library
library ("spatial")
; read a spatial data set
topo = read("topo.dat")
; calculate a polynomial regression surface of order 2
myres = SPKRsurfls (2, topo)
A list consisting of input parameters, intermediate results, and final results of a polynomial regression surface. This list will be used in other spatial statistics quantlets such as SPKRtrmat, SPKRcorrelogram, or SPKRvariogram.
| Library: | spatial |
| See also: | SPKRsurfgls SPKRexpcov SPKRgaucov SPKRsphercov SPKRtrmat SPKRprmat SPKRsemat SPKRcorrelogram SPKRvariogram SPKRmultcontours |