<p>With 117 weeks of sales data, your variables will most likely be non-stationary and have some kind of trend or seasonality. A simple linear regression model won't give you reliable results in such a case. You will have to apply a time series model, such as ARIMA or SARIMA. I would proceed as follows:</p>
<ol>
<li><p><strong>Check for stationarity</strong>: it's sales data, there is a good chance you will find some &quot;trend&quot; as the brand grows and sales increase over time. Moreover, the sales may vary up and down in a cyclical pattern because you might have some periods of high sales followed by low sales. This is called &quot;seasonality&quot;, and it will depend on the nature of the products you are selling. Your data will likely be non-stationary due to these factors.</p>
</li>
<li><p><strong>Look at ACF and PACF plots</strong>: these plots will show whether you will need any Autoregressive (AR) or Moving Average (MA) terms in your model. It will also give you a good idea about the number of these terms you will need. You can also detect the length of the seasonal pattern/cycle and seasonal-AR/MA terms using ACF and PACF, if there is any seasonality present.</p>
</li>
<li><p><strong>Nature of seasonality</strong>: if there is seasonality, you'll have to check whether it is additive or multiplicative. For additive seasonality, the ARIMAX model should be enough by including seasonal-AR/MA term or seasonal differencing. For multiplicative seasonality, you will have to apply the SARIMAX model.</p>
</li>
<li><p><strong>Apply ARIMAX/SARIMAX</strong>: the model will have brand1 sales as your dependent variable and all the other brands' sales as independent variables. Along with these, your model will have AR, MA, seasonal-AR and seasonal-MA terms as required. Such a model is called an ARIMAX model. If you have multiplicative seasonality in your data, then apply a SARIMAX model. This model will still have AR/MA and seasonal AR/MA terms, but their interaction is multiplicative.</p>
</li>
</ol>
<p>This procedure should most likely do the trick for you and give you some good results.</p>

CC BY-SA 4.0
2022-06-20T10:46:25.927Z
2022-06-20T10:46:25.927Z
Spur Economics
<p>This can be seen as a time series problem or a general regression problem.</p>
<p>If former, you can go for a SARIMAX model for each chain. The seasonal/cyclical/persistence variation across time can be exploited for better predictability.</p>
<p>Alternatively, you can convert use past brand1 weekly sale as regressors:
y(t), other regressors, chain dummy, y(t-1), y(t-2)...</p>
<p>The same can be done with other brand sales too (to get more regressors).
And then use a Gradient Boosting model like CatBoost for prediction.</p>

CC BY-SA 4.0
2022-01-23T19:56:36.103Z
Gradient boosting is an optimization technique, not a model. What model is behind CatBoost, if any?
Richard Hardy
CC BY-SA 4.0
2022-01-21T02:55:10.503Z
2022-01-21T02:55:10.503Z
Pranjal
<p>I have a sales data for brand1 (it has to be my dependent variable) and for brand2, brand3 and brand4. All of them are presented for 5 different chains. Data for every of chain is presented for each week from 1 to 117. It looks like presented below:</p>
<p><a href="https://i.sstatic.net/7nKnz.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/7nKnz.png" alt="enter image description here" /></a></p>
<p>I have 585 rows.
How can I build my model to explain brand1 sale?
How can I deal with chain and weeks data?
I thought about presenting chain data as dummy variables, but what in this case I should do with weeks?</p>

<econometrics>
How to deal with building a linear model where I have sales data for 5 different chains and 117 weeks?
kasandraaa
# How to deal with building a linear model where I have sales data for 5 different chains and 117 weeks?

(Asked by: username_0 on 2022-01-20)

I have a sales data for brand1 (it has to be my dependent variable) and for brand2, brand3 and brand4. All of them are presented for 5 different chains. Data for every of chain is presented for each week from 1 to 117. It looks like presented below:

[![enter image description here](https://i.sstatic.net/7nKnz.png)](https://i.sstatic.net/7nKnz.png)

I have 585 rows.
How can I build my model to explain brand1 sale?
How can I deal with chain and weeks data?
I thought about presenting chain data as dummy variables, but what in this case I should do with weeks?

**Tags:** econometrics


---

## 2 answers

### Answer by username_1 on 2022-06-20. Score: 1

With 117 weeks of sales data, your variables will most likely be non-stationary and have some kind of trend or seasonality. A simple linear regression model won't give you reliable results in such a case. You will have to apply a time series model, such as ARIMA or SARIMA. I would proceed as follows:

1. **Check for stationarity**: it's sales data, there is a good chance you will find some "trend" as the brand grows and sales increase over time. Moreover, the sales may vary up and down in a cyclical pattern because you might have some periods of high sales followed by low sales. This is called "seasonality", and it will depend on the nature of the products you are selling. Your data will likely be non-stationary due to these factors.
2. **Look at ACF and PACF plots**: these plots will show whether you will need any Autoregressive (AR) or Moving Average (MA) terms in your model. It will also give you a good idea about the number of these terms you will need. You can also detect the length of the seasonal pattern/cycle and seasonal-AR/MA terms using ACF and PACF, if there is any seasonality present.
3. **Nature of seasonality**: if there is seasonality, you'll have to check whether it is additive or multiplicative. For additive seasonality, the ARIMAX model should be enough by including seasonal-AR/MA term or seasonal differencing. For multiplicative seasonality, you will have to apply the SARIMAX model.
4. **Apply ARIMAX/SARIMAX**: the model will have brand1 sales as your dependent variable and all the other brands' sales as independent variables. Along with these, your model will have AR, MA, seasonal-AR and seasonal-MA terms as required. Such a model is called an ARIMAX model. If you have multiplicative seasonality in your data, then apply a SARIMAX model. This model will still have AR/MA and seasonal AR/MA terms, but their interaction is multiplicative.

This procedure should most likely do the trick for you and give you some good results.


---

### Answer by username_2 on 2022-01-21. Score: 0

This can be seen as a time series problem or a general regression problem.

If former, you can go for a SARIMAX model for each chain. The seasonal/cyclical/persistence variation across time can be exploited for better predictability.

Alternatively, you can convert use past brand1 weekly sale as regressors:
y(t), other regressors, chain dummy, y(t-1), y(t-2)...

The same can be done with other brand sales too (to get more regressors).
And then use a Gradient Boosting model like CatBoost for prediction.

> **Comments:**
> **username_3**: Gradient boosting is an optimization technique, not a model. What model is behind CatBoost, if any?  

---

