\Header{predict.trls}{Predict method for trend surface fits}
\keyword{spatial}{predict.trls}
\begin{Description}\relax
Predicted values based on trend surface model object
\end{Description}
\begin{Usage}
\begin{verbatim}
## S3 method for class 'trls':
predict(object, x, y, ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{object}] Fitted trend surface model object returned by \code{surf.ls}

\item[\code{x}] Vector of prediction location eastings (x coordinates)

\item[\code{y}] Vector of prediction location northings (y coordinates)

\item[\code{...}] further arguments passed to or from other methods.

\end{ldescription}
\end{Arguments}
\begin{Value}
\code{predict.trls} produces a vector of predictions corresponding
to the prediction locations. To display the output with \code{image}
or \code{contour}, use \code{trmat} or convert the returned vector
to matrix form.
\end{Value}
\begin{References}\relax
Venables, W. N. and Ripley, B. D. (2002)
\emph{Modern Applied Statistics with S.} Fourth edition.  Springer.
\end{References}
\begin{SeeAlso}\relax
\code{\Link{surf.ls}}, \code{\Link{trmat}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
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")
\end{ExampleCode}
\end{Examples}

