Hai
I was trying to merge two data sets using "date variable" as common. One of the data sets is a panel data with multiple observations for a day and the another have weather observations for each day and some days there are no observations. When I tried to merge these two datasets, I got the error message "variable date does not uniquely identify observations in the master data stata".
My master dataset looks like:
and my second dataset looks like:
Can you please help me to merge these two datasets?
Thanks in advance
I was trying to merge two data sets using "date variable" as common. One of the data sets is a panel data with multiple observations for a day and the another have weather observations for each day and some days there are no observations. When I tried to merge these two datasets, I got the error message "variable date does not uniquely identify observations in the master data stata".
My master dataset looks like:
date | landwk | dealr | quantity | price | spp |
1-Jan-07 | 2007w1 | 10 | 40 | 1 | 5 |
1-Jan-07 | 2007w1 | 10 | 583.1 | 0.840336 | 4 |
1-Jan-07 | 2007w1 | 10 | 31.57143 | 1.12 | 1 |
1-Jan-07 | 2007w1 | 10 | 1.565217 | 0.69 | 1 |
2-Jan-07 | 2007w1 | 13 | 20.52174 | 0.7475 | 1 |
2-Jan-07 | 2007w1 | 13 | 35.42857 | 1.12 | 1 |
2-Jan-07 | 2007w1 | 10 | 86.57143 | 1.12 | 1 |
2-Jan-07 | 2007w1 | 13 | 189.7143 | 1.12 | 1 |
2-Jan-07 | 2007w1 | 12 | 0 | 0 | |
date | wtempQuon | atempQuon | wspeedQuon | wgustQuon |
1/1/2007 | 6.411864 | 7.785593 | 6.168644 | 8.516949 |
1/10/2007 | 6.682353 | NA | 3.169608 | 5.35098 |
1/11/2007 | 6.438938 | NA | 8.125664 | 11.41416 |
1/12/2007 | 6.578302 | 8.581132 | 5.318868 | 7.106604 |
1/13/2007 | NA | NA | NA | NA |
1/14/2007 | 6.366667 | NA | 99 | NA |
1/15/2007 | NA | NA | NA | NA |
1/16/2007 | NA | 4.532353 | 6.720588 | 11.21765 |
1/17/2007 | NA | NA | 6.668182 | 10.91818 |
1/18/2007 | 4.647748 | -7.18468 | 5.54955 | 8.818919 |
1/19/2007 | 4.663077 | -3.34615 | 2.7 | 3.850769 |
Thanks in advance
Comment