predict.ucm: Unobserved Components Model Predictions

Description Usage Arguments Value See Also Examples

View source: R/predict.ucm.R

Description

Function predict.ucm predicts the future observations of an Unobserved Components Model. The ucm function returns an object model of class SSModel which is then further used in predict.SSModel.

Usage

1
2
## S3 method for class 'ucm'
predict(object, n.ahead, newdata, ...)

Arguments

object

an object of class SSModel which can be retrieved from $model call of an object of class ucm.

n.ahead

number of points for which forecasts are to generated.

newdata

A compatible dataframe to be added in the end of the old object for which the predictions are required. If omitted, predictions are either for the past data points, or if argument n.ahead is given, n.ahead time steps ahead.

...

ignored.

Value

A matrix or list of matrices containing the predictions.

See Also

predict.SSModel.

Examples

1
2
modelNile <- ucm(Nile~0, data = Nile, slope = TRUE)
predict(modelNile$model, n.ahead = 12)

kaushikrch/rucm documentation built on April 2, 2018, 8:25 p.m.