shpro | date | price |
1 | 1 | 100 |
1 | 2 | 100 |
1 | 3 | 100 |
1 | 4 | 100 |
2 | 1 | 98 |
2 | 2 | 100 |
2 | 3 | 102 |
2 | 4 | 104 |
3 | 1 | 99 |
3 | 2 | 100 |
etc. | etc. | etc. |
I am carrying out a fixed effects regression with time fixed effects and shop-product fixed effects. I wish to condition my regression on the fact that the price of each product at date=1 is different to the price of that same product at date=4. I initially generated a variable for price at date=1 and date=4 but of course this does not work since each observation has only one date. I have an inkling that I may need to reshape the data, but I am not entirely sure on how to do this.
Any help will be so much appreciated.
0 Response to How to remove observations with no change in the dependent variable in a regression ?
Post a Comment