This package implements the algorithm described in the paper "Forecasting using sparse cointegration" by Ines Wilms and Christophe Croux, available at https://doi.org/10.1016/j.ijforecast.2016.04.005.
The code is based on the code that was made available with the paper, but should be easier to use by a novice user.
To install the package run the following:
library(devtools)
install_github("jonlachmann/glassor")
install_github("jonlachmann/sparsecoint")
To build a model the function sparsecoint
is used, an example is given below, where a forecast is also made and plotted:
library(sparsecoint)
model <- sparsecoint(data, p=12, intercept=TRUE)
forecast <- predict(model, h=12, samples=500)
plot(forecast)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.