Learn R Programming

predtoolsTS (version 0.1.1)

pred: Predictions

Description

Performs predictions over a trained model.

Usage

pred(model = NULL, n.ahead = 20, tserie = NULL, predictions = NULL)

Arguments

model

A modl object. Contains the trained model we want to predict with.

n.ahead

Number of values to predict ahead of the end of the original time serie. Default value is 20. Must ve lower than 100.

tserie

A ts object.

predictions

A ts object.

Value

A list is returned of class pred containing:

tserie

Original time serie.

predictions

Time serie with the predictions.

Details

Predicts future values over a "modl" object which can be ARIMA or data mining, and returns the predictions. Data mining predictions start right after the last value contained in the training data, so they overlap with the end of the original.

The object contains only two time series: the original one and the predictions. You can just set these series aswell.

See Also

modl pred.arima, pred.dataMining, pred.compareModels

Examples

Run this code
# NOT RUN {
prediction <- pred(model=modl(prep(AirPassengers)),n.ahead=25)
pred(tserie=prediction$tserie, predictions=prediction$predictions)
# }

Run the code above in your browser using DataLab