make.Amatrix.Krig {fields}R Documentation

Computes the prediction matrix for a Krig fit.

Description

For fixed covariance parameters the Krig estimate is a linear function of the data. This function return the matrix that maps the observed y vector into the predicted values.

Usage

make.Amatrix.Krig(out, x0=out$x, lambda)

Arguments

out The output object from using Krig to fit a data set
x0 The points where the function is to be predicted
lambda Value of the smoothing parameter. Default is value from the Krig object.

Value

A matrix such that when multiplied times the data vector Y gives the predicted values of the spatial process estimate at the points x0.

See Also

Krig, make.Amatrix, predict.se.Krig

Examples

# Compute the A matrix or "hat" matrix for a spatial process estimate
# with an exponential covariance, range= 100.
# check that this gives the same predicted values 
krig.out<- Krig( ozone$x, ozone$y, exp.cov, theta=100)
A<- make.Amatrix( krig.out, ozone$x)
test.fitted.values<- A%*%ozone$y  

# now compare this to predict( krig.out) or krig.out$fitted.values 
#                    they are all  the same! 

[Package fields version 1.7.2 Index]