I have a doubt about forecasting analysis.

Let's say I have a "time" variable and a "budget" variable. I would like to build two model:

  1. time series model where I forecast the budget for the next, for example, 6 months;
  2. another time series model where I forecast the next 6 months (same as above) but where I consider a loss of budget due to another lockdown (due to pandemic) during the months of november and december.

For 1, I would apply a standard forecasting method, but I have a doubt about number 2, what would be the right method and packages to do such thing, if possible?

I would like to do that for a thesis project but I just started to scratch the surface of time series analysis.

Thanks in advance.


I suggest using a categorical variable to model the effect of the lockdown (imposed or not). In order to include this into a standard model, such as linear regression, you need to represent it as a Dummy Variable using 0/1 values. A standard model would would look something like this:

When lock down is imposed $D_{lockdown}=1$, else $D_{lockdown}=0$. The coefficient $b_2$ will give an estimation of how much the intercept of $y$ changes when lockdown is imposed.

  • $\begingroup$ Hi Akylas, thank you for the answer! So basically I should do a linear regression instead of ts analysis to forecast the budget due to lockdown, but how can I say to the model to set november and december in lockdown since I don't have data because they are the data I would like to forecast? I hope I have been clear and thanks again for your time! $\endgroup$
    – Dany
    Jul 23 '20 at 8:27

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.