Description Usage Arguments Details Value Author(s) See Also Examples

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

1 | ```
ts.analysis(tsdata, x.order=NULL, prediction.steps=1, tojson=T)
``` |

`tsdata` |
The input univariate time series data |

`x.order` |
An integer vector of length 3 specifying the order of the Arima model |

`prediction.steps` |
The number of prediction steps |

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

This function automatically tests for stationarity of the input time series data using `ts.stationary.test`

function. Depending the nature of the time series data and the stationary tests there are four branches:
a.)short and non seasonal, b.)short and seasonal, c.)long and non seasonal and d.)long and seasonal.
For branches a and c `ts.non.seas.model`

is used and for b and d `ts.seasonal.model`

is used.

This function also decomposes both seasonal and non seasonal time series through `ts.non.seas.decomp`

and
`ts.seasonal.decomp`

and forecasts h steps ahead the user selected(default h=1) using `ts.forecast`

.

A json string with the parameters:

acf.param

acf.parameters:

acf The estimated acf values of the input time series

acf.lag The lags at which the acf is estimated

confidence.interval.up The upper limit of the confidence interval

confidence.interval.low The lower limit of the confidence interval

pacf.parameters:

pacf The estimated pacf values of the input time series

pacf.lag The lags at which the pacf is estimated

confidence.interval.up The upper limit of the confidence interval

confidence.interval.low The lower limit of the confidence interval

acf.residuals.parameters:

acf.res The estimated acf values of the model residuals

acf.res.lag The lags at which the acf is estimated of the model residuals

confidence.interval.up The upper limit of the confidence interval

confidence.interval.low The lower limit of the confidence interval

pacf.residuals.parameters:

pacf.res The estimated pacf values of the model residuals

pacf.res.lag The lags at which the pacf is estimated of the model residuals

confidence.interval.up The upper limit of the confidence interval

confidence.interval.low The lower limit of the confidence interval

param

stl.plot:

trend The estimated trend component

trend.ci.up The estimated up limit for trend component (for non seasonal time series)

trend.ci.low The estimated low limit for trend component (for non seasonal time series)

seasonal The estimated seasonal component

remainder The estimated remainder component

time The time of the series was sampled

stl.general:

stl.degree The degree of fit

degfr The effective degrees of freedom for non seasonal time series

degfr.fitted The fitted degrees of freedom for non seasonal time series

fitted The model's fitted values

residuals The residuals of the model (fitted innovations)

compare:

arima.order The Arima order for seasonal time series

arima.coef A vector of AR, MA and regression coefficients

arima.coef.se The standard error of the coefficients

covariance.coef The matrix of the estimated variance of the coefficients

resid.variance The residuals variance

not.used.obs The number of not used observations for the fitting

used.obs The used observations for the fitting

loglik The maximized log-likelihood (of the differenced data), or the approximation to it used

aic The AIC value corresponding to the log-likelihood

bic The BIC value corresponding to the log-likelihood

gcv The generalized cross-validation statistic time series

aicc The second-order Akaike Information Criterion corresponding to the log-likelihood for seasonal time series

forecasts

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

Kleanthis Koupidis, Charalampos Bratsas

`ts.stationary.test`

, `ts.acf`

, `ts.seasonal.model`

, `ts.seasonal.decomp`

,
`ts.non.seas.model`

, `ts.non.seas.decomp`

, `ts.forecast`

1 | ```
ts.analysis(Athens_draft_ts, prediction.steps=3)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.