Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

predict.trls

Predict method for trend surface fits


Description

Predicted values based on trend surface model object

Usage

## S3 method for class 'trls'
predict(object, x, y, ...)

Arguments

object

Fitted trend surface model object returned by surf.ls

x

Vector of prediction location eastings (x coordinates)

y

Vector of prediction location northings (y coordinates)

...

further arguments passed to or from other methods.

Value

predict.trls produces a vector of predictions corresponding to the prediction locations. To display the output with image or contour, use trmat or convert the returned vector to matrix form.

References

Venables, W. N. and Ripley, B. D. (2002) Modern Applied Statistics with S. Fourth edition. Springer.

See Also

Examples

data(topo, package="MASS")
topo2 <- surf.ls(2, topo)
topo4 <- surf.ls(4, topo)
x <- c(1.78, 2.21)
y <- c(6.15, 6.15)
z2 <- predict(topo2, x, y)
z4 <- predict(topo4, x, y)
cat("2nd order predictions:", z2, "\n4th order predictions:", z4, "\n")

spatial

Functions for Kriging and Point Pattern Analysis

v7.3-14
GPL-2 | GPL-3
Authors
Brian Ripley [aut, cre, cph], Roger Bivand [ctb], William Venables [cph]
Initial release
2021-04-17

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.