Univariate time series forecasts for short and long time series data using the appropriate model.
ts.forecast(ts_modelx, h=1, tojson=F)
The input univariate time series data
The number of prediction steps
If TRUE the results are returned in json format, default returns a list
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.
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
1 2 3 4
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.