I have two datasets.
One containing most of my data:
ISIN Name Year TotalAssets Turnover RoA Employees
1. Nr1 Bank1 2005 30.000 1 0,5 300
2. Nr1 Bank1 2006 31.000 1 0,3 300
3. Nr1 Bank1 2007 28.000 1 0,3 280
4. Nr2 Bank2 2005 150.000 0 0,8 2000
5. Nr2 Bank2 2006 - 0 - 2200
6. Nr2 Bank2 2007 - 0 - 2200
7. Nr3 Bank3 2005 20.000 1 0,7 275
And another containing some missing information from the first dataset:
ISIN Name Year TotalAssets RoA
1. Nr2 Bank2 2005 150.000 0,8
2. Nr2 Bank2 2006 180.000 1,3
3. Nr2 Bank2 2007 170.000 0,7
4. Nr2 Bank2 2008 150.000 0,4
When I combine these datasets using:
merge 1:1 ISIN Year using "Dataset2"
for some reason, only the master only (1) and using only (2) match the variables TotalAssets and RoA, while matched(3) gives missing data for every case on the TotalAssets and RoA variable.
The merged dataset looks something like this:
ISIN Name Year TotalAssets Turnover RoA Employees _merge
1. Nr1 Bank1 2005 30.000 1 0,5 300 master only (1)
2. Nr1 Bank1 2006 31.000 1 0,3 300 master only (1)
3. Nr1 Bank1 2007 28.000 1 0,3 280 master only (1)
4. Nr2 Bank2 2005 150.000 0 0,8 2000 master only (1)
5. Nr2 Bank2 2006 - 0 - 2200 matched(3)
6. Nr2 Bank2 2007 - 0 - 2200 matched(3)
7. Nr2 Bank2 2008 150.000 - 0,4 - using only (2)
8. Nr3 Bank3 2005 20.000 1 0,7 275 master only (1)
However the matched don't show any data for the variables on which it's supposed to merge.
Am I doing something wrong or how would I go about doing it in a better way?