I have the following variables along with sales data going back a few years:
- date # simple date, can be split in year, month etc
- shipping_time (0-6 weeks) # 0 weeks means in stock, more weeks means the product is out of stock but a shipment is on the way to the warehouse. Longer shipping times have a siginificant impact on sales.
- sales # amount of products sold
I need to predict the sales (which vary seasonally) while taking into account the shipping time. What would be a simple regression model that would produce reasonable results? I tried linear regression with only date and sales, but this does not account for seasonality, so the prediction is rather weak.
Edit: As a measure of accuracy, I will withold a random sample of data from the input and compare against the result.
Extra points if it can be easily done in python/scipy
Data can look like this
--------------------------------------------------
| date | delivery_time| sales |
--------------------------------------------------
| 2015-01-01 | 0 |10 |
--------------------------------------------------
| 2015-01-01 | 7 |2 |
--------------------------------------------------
| 2015-01-02 | 7 |3 |
...