newdata
.## S3 method for class 'lm':
forecast(object, newdata, level=c(80,95), fan=FALSE, ...)
lm
". Usually the result of a call to lm
.predict.lm()
.forecast
".
The function summary
is used to obtain and print a summary of the
results, while the function plot
produces a plot of the forecasts and prediction intervals.
The generic accessor functions fitted.values
and residuals
extract useful features of
the value returned by forecast.lm
.
An object of class "forecast"
is a list containing at least the following elements:object
itself or the time series used to create the model stored as object
).forecast.lm
produces predicted values, obtained by evaluating the regression function in newdata
. It is largely a wrapper to predict.lm
and returns the output in the form of a forecast
object. If the original data are time series, the function will make the forecasts time series with the appropriate parameters.predict.lm
, lm
.