predict {math} R Documentation

Model Predictions

Description


predict is a generic function for predictions from the results of
various model fitting functions. The function invokes particular
methods which depend on the class of the first argument.

Usage

predict(lm, x);

Arguments

lm

a model Object For which prediction Is desired. [as lmCall]

x

-

env

[as Environment]

Details

Most prediction methods which are similar to those for linear models have an argument newdata specifying the first place to look for explanatory variables to be used for prediction. Some considerable attempts are made to match up the columns in newdata to those used for fitting, for example that they are of comparable types and that any factors have the same level set in the same order (or can be transformed to be so). Time series prediction methods In package stats have an argument n.ahead specifying how many time steps ahead To predict. Many methods have a logical argument se.fit saying If standard errors are To returned.

Authors

sciBASIC.NET

Value

The form of the value returned by predict depends on the class of its argument. See the documentation of the particular methods for details of what is produced by that method.

clr value class

Examples


[Package math version 5.0.1.2389 Index]