I have a variable year (2003 and 2013), an export (dummy 0 and 1) and an idcode. I would like to create a dummy as follows: if for an idcode in 2003 export is 0 but in 2013 it is 1 then the dummy would be 1. For example:
Then, the new base will be:
Can anybody help me? Thanks in advance for your attention!
Code:
year export idcode 2003 1 6000146 2003 0 3047347 2013 1 6000146 2013 1 3047347
Code:
year export idcode dummy 2003 1 6000146 0 2003 0 3047347 0 2013 1 6000146 0 2013 1 3047347 1
Comment