## Computational Resources

To generate a predicted value at a
single grid point using *N* data points, PROC KRIGE2D
must solve
the following kriging system:

where *C* is (*N*+1) ×(*N*+1),
and the right-hand side vector *C*_{0}
is (*N*+1) ×1.
Holding the matrix and vector associated
with this system in core requires approximately
[(*N*^{2})/2] doubles (with typically eight
bytes per double).
The CPU time used in solving the system
is proportional to *N*^{3}. For large *N*,
this time dominates the time to compute
the [((*N*+1)(*N*+2))/2] elements of the
covariance matrix **C** from the
specified covariance or variogram model.
This latter computation is proportional
to *N*^{2}.

For local kriging, the kriging system
is set up and solved for each grid point.
Part of the set up process involves
determining the neighborhood of each
grid point. A fast K-D tree algorithm is
used to determine neighborhoods. For *G*
grid points, the dominant CPU time factor
is setting up and solving the
*G* kriging systems.
The *N* in the preceding algorithm is the number of data points in a given
neighborhood, and it can differ for each grid point.

In global kriging, the entire input data
set and all grid points are used to set up
and solve the single system

Again *C* is (*N*+1) ×(*N*+1),
but is now (*N*+1) ×*G*,
where *G* is the number of grid points, and
*N* is the number of nonmissing observations in the
input data set. The right-hand side matrix *C*_{0}
is (*N*+1) ×*G*.
Memory requirements are approximately [(*N*^{2})/2] + *GN* doubles.
The CPU time used in solving the system
is still dominated by the *N*^{3} factorization
of the left-hand side.

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.