I have data for ten grocery stores, with weekly sales for multiple products (about 1000) during 3 years.
I'm trying to calculate store level elasticity to compare between those ten stores. Let's assume that all I have as variables are store_id
, product_id
, unit sales
, price
and week number
.
The regression that I'm trying to fit is the following (looping for each store individually):
log(units) ~ log(price) + month + (1+log(price)|product_id)
I'm assuming I get elasticity coefficient for each store in the fixed effect and random effects are the elasticity variation by product in each store. First, am I correct with my assumption here?
If price and unit volume vary significantly by product, for example:
Product A sells on average 1000 units per week at a price $5.99
Product B sells on average 100 units per week with price $15.50
Do I need to scale both units and price by product so that a given product does not have an outsized impact on overall elasticity (the fixed effect)?
If this is not the ideal model to run, would you recommend a better approach?