Using TimeSeries.OBeu with OpenCPU"

Introduction

This document describes the use of the functions implemented in TimeSeries.OBeu package in OpenCPU environment, after installing OpenCPU and TimeSeries.OBeu package on your OpenCPU server address(/ocpu/test).

How to use functions

 ../library/ {name of the library} /R/ {function}

OpenCPU and TimeSeries.OBeu

ts.analysis

In this example we will use ts.analysis function that returns in a single call a json string or a list with the following components:

+-----------------------------+---------------------------+-------------------------------------------------------------+ | Component | Output | Description | +=============================+===========================+=============================================================+ | acf.parameters | - acf | - ACF values of the input time series | | | - acf.lag | - Lags at which the acf is estimated | | | - confidence.interval.up | - Upper limit of the confidence interval | | | - confidence.interval.low | - Lower limit of the confidence interval | +-----------------------------+---------------------------+-------------------------------------------------------------+ | pacf.parameters | - pacf | - PACF values of the input time series | | | - pacf.lag | - Lags at which the pacf is estimated | | | - confidence.interval.up | - Upper limit of the confidence interval | | | - confidence.interval.low | - Lower limit of the confidence interval | +-----------------------------+---------------------------+-------------------------------------------------------------+ | acf.residuals.parameters | - acf.res | - ACF values of the model residuals | | | - acf.res.lag | - Lags at which the acf is estimated of the model residuals | | | - confidence.interval.up | - Upper limit of the confidence interval | | | - confidence.interval.low | - Lower limit of the confidence interval | +-----------------------------+---------------------------+-------------------------------------------------------------+ | pacf.residuals.parameters | - pacf.res | - Pacf values of the model residuals | | | - pacf.res.lag | - Lags at which the pacf is estimated of the model residuals| | | - confidence.interval.up | - Upper limit of confidence interval | | | - confidence.interval.low | - Lower limit of confidence interval | +-----------------------------+---------------------------+-------------------------------------------------------------+ | stl.plot | - trend | - Trend component | | | - trend.ci.up | - Up limit for trend component | | | - trend.ci.low | - Low limit for trend component | | | - seasonal | - Seasonal component | | | - remainder | - Remainder component | | | - time | - Time of the series was sampled | +-----------------------------+---------------------------+-------------------------------------------------------------+ | stl.general | - stl.degree | - Degree of fit | | | - degfr | - Effective degrees of freedom | | | - degfr.fitted | - Fitted degrees of freedom | | | - fitted | - Model's fitted values | +-----------------------------+---------------------------+-------------------------------------------------------------+ | residuals | - residuals | - Residuals of the model | +-----------------------------+---------------------------+-------------------------------------------------------------+ | compare | - arima.order | - Arima order | | | - arima.coef | - AR, MA and regression coefficients | | | - arima.coef.se | - Standard error of the coefficients | | | - covariance.coef | - Variance of the coefficients | | | - resid.variance | - Residuals variance | | | - not.used.obs | - Number of not used observations | | | - used.obs | - Used observations | | | - loglik | - Maximized log-likelihood, | | | - aic | - AIC value | | | - bic | - BIC value | | | - gcv | - Generalized cross-validation statistic | | | - aicc | - Second-order AIC | +-----------------------------+---------------------------+-------------------------------------------------------------+ | forecasts | - ts.model | - A string indicating the arima orders | | | - data_year | - Time of time series data | | | - data | - Time series values | | | - predict_time | - Time of the predicted values | | | - predict_values | - Predicted values | | | - up80 | - Upper 80% confidence limit | | | - low80 | - Lower 80% confidence limit | | | - up95 | - Upper 95% confidence limit | | | - low95 | - Lower 95% confidence limit | +-----------------------------+---------------------------+-------------------------------------------------------------+

Table: ts.analysis components

Select library and function

  1. Go to: yourserver/ocpu/test

  2. Copy and paste the following function to the endpoint

../library/TimeSeries.OBeu/R/ts.analysis
# library/ {name of the library} /R/ {function}
  1. Select Method: Post

Adding parameters parameters

Click add parameters every time you want to add a new parameters and values.

  1. Define the input data:

    • Param Name: tsdata
    • Param Value: e.g. Athens_executed_ts
  2. Define the prediction steps parameter:

    • Param Name: prediction.steps
    • Param Value: 2

You add likewise x.order parameter to fit a specific arima order, see TimeSeries.OBeu reference manual for further details.

  1. Ready! Click on Ajax request!

Results

  1. copy the /ocpu/tmp/{this_id_number}/R/.val (second on the right panel)

  2. finally, paste yourserver/ocpu/tmp/{this_id_number}/R/.val on a new tab.

Further Details

Github



Try the TimeSeries.OBeu package in your browser

Any scripts or data that you put into this service are public.

TimeSeries.OBeu documentation built on Dec. 18, 2019, 1:48 a.m.