1
$\begingroup$

My dataset is a univariate monthly time series. I'm looking to predict the future values. Until now I have used ARIMA models. I've heard of other models of regression, but they need to have X and y as a training set unlike ARIMA.

  • Is there an efficient method to get training and testing data?

  • What are the best models that I can use?

Implementations in Python are also welcome.

$\endgroup$
  • $\begingroup$ Can you clarify your first question? $\endgroup$ – Richard Hardy Feb 17 '17 at 14:35
  • $\begingroup$ I've worked with basic regression models, all of them used data with more than 1 feature. My problem is with this dataset I have only 1 feature. I can't use fit(X,y), in ARIMA I only pass fit(ts). So is there a way that I can have X and y with my current dataset ? (I'm new to regression models and time series) $\endgroup$ – datascana Feb 17 '17 at 15:14
3
$\begingroup$

If you had only one variable in a cross sectional setting, then it would indeed be difficult to talk about a regression model. However, in a time series setting there are some helpful tricks. In autoregressive models you use lags of the dependent variable as regressors since you expect that the past values of the variable may help predict the future values. That is how AR models work, and ARIMA is a generalization of that.

Moreover, in the context of seasonal time series you may exploit the fact that the data exhibits seasonal patterns. Then you may use a seasonal ARIMA (SARIMA) model or a regression with ARIMA errors where the regressors are seasonal dummy variables. In R you do that with the the function arima. To include dummies you use the function's argument xreg into which you supply a data matrix made of columns that are the seasonal dummy variables corresponding to your original time series. (As an alternative for dummies, you may use Fourier terms; see Rob J. Hyndman's blog post "Forecasting with long seasonal periods".)

You may read more in Hyndman & Athanasopoulos "Forecasting: Principles and Practice" Section 8.9 and Section 9.1, for example.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.