Rev 2703 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
% file modreg/man/predict.loess.Rd% copyright (C) 1998 B. D. Ripley%\name{predict.loess}\title{Predict Loess Curve or Surface}\usage{predict.loess(object, newdata = NULL, se = FALSE)}\alias{predict.loess}\arguments{\item{object}{an object fitted by \code{loess}.}\item{newdata}{an optional data frame specifying points at which to dothe predictions. If missing, the original data points are used.}\item{se}{should standard errors be computed?}}\description{Predictions from a \code{loess} fit, optionally with standard errors.}\details{The standard errors calculation is slower than prediction.When the fit was made using \code{surface="interpolate"} (thedefault), \code{predict.loess} will not extrapolate< so points outsidean axis-aligned hypercube enclosing the original data will havemissing (\code{NA}) predictions and standard errors.}\value{If \code{se = FALSE}, a vector giving the prediction for each row of\code{newdata} (or the original data). If \code{se = TRUE}, a listcontaining components\item{fit}{the predicted values.}\item{se}{an estimated standard error for each predicted value.}\item{residual.scale}{the estimated scale of the residuals used incomputing the standard errors.}\item{df}{an estimate of the effective degrees of freedom used inestimating the residual scale, intended for use with t-basedconfidence intervals. }}\author{B.D. Ripley, based on the \code{cloess} package of Cleveland,Grosse and Shyu.}\seealso{\code{\link{loess}}}\examples{data(cars)cars.lo <- loess(dist ~ speed, cars)predict(cars.lo, data.frame(speed=seq(5, 30, 1)), se=TRUE)# to get extrapolationcars.lo2 <- loess(dist ~ speed, cars,control=loess.control(surface="direct"))predict(cars.lo2, data.frame(speed=seq(5, 30, 1)), se=TRUE)}\keyword{smooth}