The main use of this function is in finding prediction standard errors.
For the Krig ( and Tps) functions the A matrix is constructed based on the
representation of the estimate as a generalized ridge regression. The
matrix expressions are explained in the references from the FIELDS manual.
For linear regression the matrix that gives predicted values is often
referred to as the "hat" matrix and is useful for regression diagnostics.
For smoothing problems the effective number of parameters in the fit is
usually taken to be the trace of the A matrix. Note that while the A
matrix is usually constructed to predict the estimated curve at the data
points Amatrix.Krig does not have such restrictions. This
is possible
because any value of the estimated curve will be a linear function of Y.
The actual calculation in this function is simple. It invovles
loop through the unit vectors at each observation and computation of the
prediction for each of these delta functions. This approach makes it easy to
handle different options such as including covariates.