Time-series modeling

I'm wondering what methods can be used to predict a future value using past values. I looked into linear regression modeling, but this doesn't allow for a time value.

As an example, say I have an independent variable $$y$$, that represents annual income for a business. Add a couple of dependent variables that are correlated to $$y$$: let $$x_1$$ represent the number of employees at time $$t$$ and $$x_2$$ represent the number of customers at time $$t$$.

I'd like to compute optimal values $$a0$$, $$a1$$, and $$a2$$ for an equation of this form:

$$y(t) = a_0 y(t-1) + a_1 x_1(t) + a_2 x_2(t)$$

Would a standard linear regression technique apply here, where I simply let $$x_0(t) = y(t-1)$$, or am I missing something important?

$$y(t) = a_0 x_0(t) + a_1 x_1(t) + a_2 x_2(t)$$

• I do not see why not. You have to regress from $t=2$ onward as $y(0)$ is not available. What do you suspect is off? Commented Apr 20, 2019 at 20:39
• Writing down the question led me to answering it with the substitution; I didn't think of this beforehand, but it would be nice to hear confirmation as well as any other approaches for modeling data like this that I may not be aware of. Commented Apr 20, 2019 at 20:40
• Likely (far) too broad, but you can start with something like this: en.wikipedia.org/wiki/Autoregressive_integrated_moving_average Commented Apr 20, 2019 at 20:43
• @ArnabAuddy I just tried my technique with Excel's regression tool. I'm highly suspicious that this method is valid with linear regression, as I ended up with a coefficient of exactly -1 for $a_0$. I don't know enough right now about how linear regression is performed to figure out what's going wrong with the idea. Commented Apr 20, 2019 at 21:03

1 Answer

In essence, you can use regression techniques or black box techniques for predicting values (eg arima models or simplified exponential smoothing methods). If you use regression techniques, the goal is to find good dependent variables (features) that explains the history the most (r squared value) and at the same time don't fit on randomness (p value is an indication). In Python, you can easily program this and test what is best. I actually experience simple arima models are better than regression techniques.