Provides a set of tools for descriptive and predictive analysis of time series data. That includes functions for interactive visualization of time series objects and as well utility functions for automation time series forecasting.
The TSstudio package provides a set of functions for time series analysis. That includes interactive data visualization tools based on the plotly package engine, supporting multiple time series objects such as
zoo. In addition, the package provides a set of utility functions for preprocessing time series data, and as well backtesting applications for forecasting models from the forecast, forecastHybrid and bsts packages.
Install the stable version from CRAN:
or install the development version from Github:
library(TSstudio)data(USgas)# Ploting time series objectts_plot(USgas)
# Seasonal plotts_seasonal(USgas, type = "all")
# Lags plotts_lags(USgas, lags = 1:12)
# Seasonal lags plotts_lags(USgas, lags = c(12, 24, 36, 48))
# Heatmap plotts_heatmap(USgas)
# Forecasting applications# Setting training and testing partitionsUSgas_s <- ts_split(ts.obj = USgas, sample.out = 12)train <- USgas_s$traintest <- USgas_s$test# Forecasting with auto.arimalibrary(forecast)md <- auto.arima(train)fc <- forecast(md, h = 12)# Plotting actual vs. fitted and forecastedtest_forecast(actual = USgas, forecast.obj = fc, test = test)
# Plotting the forecastplot_forecast(fc)
# Forecasting with backtestingUSgas_backtesting <- ts_backtesting(USgas,models = "abehntw",periods = 6,error = "RMSE",window_size = 12,h = 12)