i am building a OLS model using python, where the dependant and independent variables are lagged. This is a form of econometrics model where i want to figure out how much each independent variable contributes to the dependant, and what influence it has. The dependant is sales. Independent is average_cost_of_stock (£) and how much different it is to last year (so most values are negative as they are cheaper than last year eg -8.3 is £8.30 cheaper than lastyear ), and also the rating that customers give the store (this is expressed as a % so values eg 41.4, 50.2 etc). Ive built a model, and first time i logged sales because they are very large (eg 4mill) and obtained the following coeffients:
variable | coeff |
---|---|
lag(LOG_TOTAL_SALES, 1) | 0.15 |
lag(LOG_TOTAL_SALES, 2) | 0.12 |
lag(RATING_PERC, 0) | 0.0112 |
lag(RATING_PERC, 1) | 0.025 |
lag(RATING_PERC, 2) | -0.015 |
lag(PRICE_DIFF, 0) | 0.014 |
lag(PRICE_DIFF, 1) | 0.116 |
lag(PRICE_DIFF, 2) | -0.01 |
i next built a model NOT logging this sales with results below:
variable | coeff |
---|---|
lag(TOTAL_SALES, 1) | 0.78 |
lag(TOTAL_SALES, 2) | 0.07 |
lag(RATING_PERC, 0) | 4.4 E+06 |
lag(RATING_PERC, 1) | 1.3 E+06 |
lag(RATING_PERC, 2) | -1.4 E+06 |
lag(PRICE_DIFF, 0) | 3.4 E+07 |
lag(PRICE_DIFF, 1) | 2.4 E+06 |
lag(PRICE_DIFF, 2) | -1.4 E+06 |
I am aware the model needs optimising, but firstly i would like to answer the questions : increasing rating_perc by 1% will increase sales by X. increasing price_diff by £1 will increase sales by X. Rating_perc is responsible for X% of the total_sales, price_diff is responsible for X% of the total_sales, and the remaining is due to the normal expected sales (this is why i included the lags for total_sales as well).
I am struggling to interpret this model due to the differences in use of log, and %. So far i am believing that increasing Rating by 1% will have an immediate impact of £4.4 E+06 in sales. Increasing price diff by £1 will have an immediate impact of £3.4 E+07. But im struggling to answer the questions around how much each of the model is explained by rating, price difference and just normal sales behaviour. thank you for your help.
these are some of the references i am using : http://web.vu.lt/mif/a.buteikis/wp-content/uploads/2018/04/TasksP_06.html https://www.statsmodels.org/devel/examples/notebooks/generated/autoregressive_distributed_lag.html#Data