make.Amatrix.tps {funfits}R Documentation

Computes matrix that relates predicted values to the vector of dependent variables (Y)

Usage

make.Amatrix.tps(out, x0, lambda)

Arguments

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

Value

A matrix such that when multiplied times Y gives the predicted values of the spline at the points x0

References

FUNFITS manual

See Also

tps, make.Amatrix, predict.se.tps

Examples

# Compute the A matrix or "hat" matrix for a thin plate spline
# check that this gives the same predicted values

tps( ozone$x, ozone$y)-> tps.out
make.Amatrix( tps.out, ozone$x)-> A
A%*%ozone$y -> test.fitted.values
# now compare this to predict( tps.out) or tps.out$fitted.values
#                    they should be the same


[Package Contents]