2
$\begingroup$

I have a set of predictor variables and a target variable. I am really confused with regards to what method to use for forecasting the target variable.

For example, my data set has monthly customer profit (which is my target variable) and a set of predictor variables (balances of different accounts) for one year for each customer.

I need to predict the profit for the next 5 years. I am confused in that I do not have the data (predictor variables) for the future.

What are my possible choices of modelling?

$\endgroup$
9
  • $\begingroup$ This feels like a time series model (ARMA, ARIMA, etc.). Is what you have the profit for several years, and the a vector of predictors for each of the prior years? You can use the package timeSeries for building time series models and prediction. Regression is better used for interpolation (i.e. predicting values between the extremes of the data set). $\endgroup$ Dec 1, 2015 at 21:26
  • $\begingroup$ I dont have profit for several years,what I have is a data of a year for every customer and their profit ,with balances being the predictor variable.What I want is to predict the profit of next 5 years . $\endgroup$
    – Bg1850
    Dec 1, 2015 at 22:24
  • $\begingroup$ @CagdasOzgenc Yes both of them span for one year of data . To be precise for each customer ,the data has balances(predictors) and profit (target) of every month end in a year . My goal is to predict the profit for next year ,where I dont know the information about the predictors $\endgroup$
    – Bg1850
    Dec 2, 2015 at 21:14
  • $\begingroup$ You need regressions for each predictor using the other predictors from previous month (you may also include previous month profit). Then predict the predictors and the profit in a sliding window fashion. It is the best you can do. $\endgroup$ Dec 3, 2015 at 13:05
  • $\begingroup$ @CagdasOzgenc could you pls add a bit more explanation or piece of literature $\endgroup$
    – Bg1850
    Dec 4, 2015 at 5:51

3 Answers 3

6
+50
$\begingroup$

I have a set of predictor variables and a target variable. I am really confused with regards to what method to use for forecasting the target variable.

Start with the same things as you would started with analyzing this data as usual: look at the plots, summary statistics, clean the data if there are any errors, analyze the missing data -- if needed make decisions on what to do with missings (e.g. use single or multiple imputation). Think about your problem: What is your data? What do you want to know? Does your data enable you to answer the question that you are asking? If not, maybe you can rephrase your question to answerable one? Is there any pattern in your data that makes forecast possible (if it is purely random than your options are limited; search for "forecastability"). Consider if your data is sufficient for forecasting (e.g. if you want to make a prediction about next five years than you should have at least data on the previous five years, but in most cases much more than that). If you are modeling time-series than you have to thing about nature of the series: is there any seasonality (e.g. increases in summer and drops in winter)? Are there any things that happen with some regularity that influence your data? Is your data autocorrelated? Finally, do you have any a priori knowledge about your data (e.g. if you want to predict human height it simply cannot be lower than zero)? Take all those cases into consideration. You can find a friendly popular introduction to thinking about forecasting in Nate Silvers (2012) book The Signal and the Noise. See also The Black Swan by Taleb (2007) for critique and examples of forecasts going wrong.

Now, after spending some time with looking and thinking about your data you have to choose appropriate method or model for it. If it is time-series data than consider one of the multiple methods for modeling and forecasting time-series (e.g. exponential smoothing, ARIMA). You can include time component in regression or generalized linear model and in some cases this is preferable method. Sometimes you need non-linear models, machine learning methods or other. If you want to include out-of-data information in your model you may need a Bayesian model. You may be also interested in conducting simulation and then base your judgment based on possible scenarios that emerged from simulation. There is too many possible choices to summarize them in a single answer, so if you are not familiar with those methods than start with some statistics handbook, check also handbooks on time-series (e.g. Chatfield, 2003) and forecasting (e.g. Hyndman and Athana­sopou­los, 2013). Notice also that sometimes simpler methods perform better than the complicated ones.

If you made your forecast, then you have to asses its performance. For this you can use bootstrap, cross-validation, hold out sample (sample that was not used during model training phase and is used only for testing your model), you can learn your model on first $N-k$ observations and try to predict results for the following $k$ cases. Remember that in most cases perfect forecast is not possible, you are looking for the best one you can get from this data and with the tools that you have. Remember also that it is often the case that if you take few forecasts made using different methods and take weighted average of them, then the averaged forecast ofter outperforms individual forecasts.

For example, my data set has monthly customer profit (which is my target variable) and a set of predictor variables (balances of different accounts) for one year for each customer.

It is hard to comment on this one, because it really depends on what is your data and what you want to forecast, but reviewing the literature should help you to get some insight about methods that fit your problem (check the links I provided and the books I refer to for some introduction).

I need to predict the profit for the next 5 years. I am confused in that I do not have the data (predictor variables) for the future.

Well... that is what forecasting is about. You build a model using the data that you have and then use this data to make educated guesses about the future. Illustrating it with simple regression model, imagine that you have model

$$ y_i = \beta_0 + \beta_1 x_i + \varepsilon_i $$

you use some data for estimating this model what leads to obtaining $\hat \beta_0$ and $\hat \beta_1$ parameters, next you use those estimated parameters and external data $x^*$ to predict unknown $y^*$ by using the formula

$$ y_i^* = \hat\beta_0 + \hat\beta_1 x_i^* $$

In this thread you can find example for making such predictions using a Bayesian model in JAGS. This part is tricky because you have to consider if it is really the case that model estimated on the data you have is adequate for applying it to the future (e.g. you have data on growth of 5-year-olds and want to use it to predict growth of adults -- the model would be obviously incorrect because rapid growth of children stops at some point). Remember that your forecast would probably be wrong, provide a prediction interval so to asses possible variability of the future values rather than single point estimate. Finally, remember that all models are wrong and you are looking for a useful one.


Silver, N. (2012). The Signal and the Noise: Why So Many Predictions Fail-but Some Don't. Penguin Group.

Chatfield, C. (2003). The Analysis of Time Series: An Introduction. Chapman and Hall/CRC.

Hyndman, R.J. and Athana­sopou­los, G. (2013). Forecasting: principles and practice. OTexts.

Taleb, N.N. (2007). The Black Swan: The Impact of the Highly Improbable. Random House.

$\endgroup$
1
  • $\begingroup$ Excellent, well thought out and written response, very helpful! $\endgroup$
    – Aesir
    Nov 21, 2018 at 4:05
3
$\begingroup$

For predicting the next 5 years, if you use ARIMA models you can only predict crude estimates since it's intrinsically a linear model.

I can see two problems:

  • 1 Choosing a prediction model.

For the first case you could use a simple neural network or a recurrent network (RNN), a boosted tree or whatever you will. The RNN case is generative and depending where you left it in the last state will generate a periodic signal (prediction) infinitely. Depending on the state it was last in and how many states there are in your system. I would just start with a simple linear model to evaluate on the existing data (split it 70/30) randomly if you can.

  • 2 Generating more data for making future predictions

Better yet, you could use an auto-encoder (AE) to generate more data for predicting the next 5 years. The input to hidden layer is an encoder and the hidden to output is the decoder.

After training the AE (this is unsupervised you don't need the targets) on the existing data you could observe the distribution of the outputs of the encoder - this is your latent space. Now, you have a distribution for each latent feature, you have a very large combinatorial space of possible input variables to the decoder, to generate new data.

You have various choices of denoising AE's for lower dimensional latent spaces or sparse AE for higher dimensional latent spaces, depending on how many input features you have.

After you generate your artificial data, you use the generated data to make predictions.

$\endgroup$
0
0
$\begingroup$

Avery useful model is the multivariate extension of ARIMA models to unclude causals. This is called Transfer Functions and sometimes Dynamic Regression

$\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.