Hello,

I am trying to work out store level price elasticity of demand for a product. I will have 104 weekly observations of price and sales per store.

I am doing this to teach a simple class (not in statistics).

In order to work out the PED (PED= % change in quantity demanded over % change in price) I need to refer to last weeks price and last weeks sales, but I don't know how.

At the moment the data is in long format, with the variables storecode sales price week.

I have considered creating 2 new variables: lastweekprice and lastweeksales but I'm not sure how to do that!


Many thanks for suggestions.

Rosie