Learn R Programming

TimeSeries.OBeu (version 1.2.4)

ts.forecast: Time series forecast results of OBEU Time Series

Description

Univariate time series forecasts for short and long time series data using the appropriate model.

Usage

ts.forecast(ts_modelx, h = 1, tojson = FALSE)

Arguments

ts_modelx

The input univariate time series data

h

The number of prediction steps

tojson

If TRUE the results are returned in json format, default returns a list

Value

A list with the parameters:

  • ts.model a string indicating the arima orders

  • data_year The time that time series data were sampled

  • data The time series values

  • predict_time The time that defined by the prediction_steps parameter

  • predict_values The predicted values that defined by the prediction_steps parameter

  • up80: The upper limit of the 80% predicted confidence interval

  • low80: The lower limit of the 80% predicted confidence interval

  • up95: The upper limit of the 95% predicted confidence interval

  • low95: The lower limit of the 95% predicted confidence interval

Details

This function is used internally in ts.analysis and forecasts the model that fits the input data using the auto.arima function(see forecast package). The model selection depends on the results of some diagnostic tests (acf,pacf,pp adf and kpss). For short time series the selected arima model is among various orders of the AR part using the first differences and the first order moving average component, with the lower AIC value.

See Also

ts.analysis, forecast

Examples

Run this code
# NOT RUN {
Athens_draft <- ts.non.seas.model(Athens_draft_ts)
#Hold the model object of non seasonal modeling
draft <- Athens_draft$model.summary 
ts.forecast(draft)

# }

Run the code above in your browser using DataLab