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).
Go to: yourserver/ocpu/test
Type to the endpoint:
../library/ {name of the library} /R/ {function}
If you want to see the function parameters you should:
GetTo run a function you should:
PostThen you can click on Ajax Request.
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
Go to: yourserver/ocpu/test
Copy and paste the following function to the endpoint
../library/TimeSeries.OBeu/R/ts.analysis # library/ {name of the library} /R/ {function}
PostClick add parameters every time you want to add a new parameters and values.
Define the input data:
tsdataAthens_executed_ts Define the prediction steps parameter:
prediction.steps2You add likewise x.order parameter to fit a specific arima order, see TimeSeries.OBeu reference manual for further details.
copy the /ocpu/tmp/{this_id_number}/R/.val (second on the right panel)
finally, paste yourserver/ocpu/tmp/{this_id_number}/R/.val on a new tab.
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.