I have three datasets:

Dataset_1= column name as ID, Date, counter_id

Dataset_2= column name as ID, no. of tickets sold

Dataset_3= column names as ID, country_code.

Here, country_code ranges from 1 to 30 as codes for different countries and counter_id as counter codes ranging from 1 to 100. I merged the datasets based on common column ID.

I have to estimate how many tickets will be sold during the next 20 days in a given country and through a specific counter.

What I have done is predict the number of tickets sold for next 10 days using time series forecasting. But, I'm not able to decide how I can predict the counter_id and country_code along with tickets sold? Please give me some useful feedback. I am a beginner in data science. Thanks!


1 Answer 1


I think you do not need to "predict" counter_id and country_code as variables, what you need is to produce results to every counter and country (and sometimes these results will be zero).

The technique you are looking for is called VAR (Vector Autoregression)


The vector autoregression (VAR) model is one of the most successful, flexible, and easy to use models for the analysis of multivariate time series. It is a natural extension of the univariate autoregressive model to dynamic multivariate time series.

The equation you propose is solvable by VAR:

$Y_t = C + A_1 Y_{t-1} + A_2 Y_{t-2} + ... + A_n Y_{t-n}$

Where $Y_t = \begin{bmatrix} Y_{i=1,j=1,t} \\ Y_{i=1,j=2,t} \\ \vdots \\ Y_{i=1,j=m,t} \\ \vdots \\ Y_{i=n,j=m,t} \end{bmatrix}$

Where, $i$ is every country, $j$ is every counter.

The usage is very similar to univariate time series analysis, which you are probably familiar with.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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