Hi all!
I'm working with a panel data such as the following (it's my first time with dataex and the preview didn't convince me at all, sorry about that).
The fact is that I'm trying to identify days on which the -mode_delta- variable (daily chainge of -price_mode-) moved in the same way (that is negative or positive) in every supermarket (-panelid-). In the example there weren't changes in the mode but I expect that along the dataset there are days that satisfy that condition. I was looking forward to tag those days with a 1 when changes are positives and a -1 when they are negatives.
Thanks in advance. Greatings,
Diego
I'm working with a panel data such as the following (it's my first time with dataex and the preview didn't convince me at all, sorry about that).
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input double t float(panelid price_mode mode_delta) 18995 160 41 0 18995 142 44 0 18995 93 35.8 0 18995 68 39.9 0 18995 45 39.9 0 18996 68 39.9 0 18996 45 39.9 0 18996 93 35.8 0 18996 142 44 0 18996 160 41 0 end format %td t label values panelid panelid label def panelid 45 "Devoto", modify label def panelid 68 "Disco", modify label def panelid 93 "Macromercado Mayorista", modify label def panelid 142 "Ta - Ta", modify label def panelid 160 "Tienda Inglesa", modify label var panelid "group(id_chain product brand)" label var price_mode "(first) price_mode"
Thanks in advance. Greatings,
Diego
Comment