Library: | spatial |
See also: | SPKRsurfls SPKRsurfgls SPKRexpcov SPKRgaucov SPKRsphercov SPKRtrmat SPKRprmat SPKRsemat SPKRvariogram SPKRmultcontours |
Quantlet: | SPKRcorrelogram | |
Description: | computes spatial correlograms of spatial data or residuals. Initially, it divides the range of the data into nint bins, computes the covariance for pairs with separation in each bin, then divides by the variance. It returns results only for bins with 6 or more pairs. |
Usage: | res = SPKRcorrelogram (krig, nint) | |
Input: | ||
krig | list, (of type "trls" or "trgls") calculated by SPKRsurfls or SPKRsurfgls | |
nint | scalar, number of bins to be used | |
Output: | ||
res | list, consisting of components xpres, ypres, cntres | |
res.xpres | n x 1 vector, x coordinates of the correlogram | |
res.ypres | n x 1 vector, y coordinates of the correlogram | |
res.cntres | n x 1 vector, number of pairs averaged per bin |
; loads the spatial statistics library library("spatial") ; reads a spatial data set topo = read("topo.dat") ; calculates a polynomial regression surface of order 2 myres = SPKRsurfls(2, topo) ; calculates the correlogram, using 25 bins corres = SPKRcorrelogram(myres, 25)
A list consisting of x and y coordinates of the correlogram and the number of pairs averaged per bin.