Dear Statalist users,

Good day to you firstly. I have 2 STATA datasets, where I'd like to transfer the variable GDP per capita from the 2nd dataset to the first dataset. The problem is that the number of years are not the same, as well as the fact that the first dataset is missing several years. If any of you have any idea as to how I can still add the variable from the second to the first dataset, I would be very grateful. Thank you very much. The first dataset looks as follows:

country year median
Argentina 1986 xxx.xx
Argentina 1987 xxx.xx
Argentina 1989 xxx.xx
Argentina 1990 xxx.xx where xxx.xx is just a number (e.g. 530.44)
Brazil 1990 xxx.xx
Brazil 1991 xxx.xx
Brazil 1992 xxx.xx
Brazil 1995 xxx.xx

And the second dataset:

country year GDP per capita
Argentina 1990 xxx.xx
Argentina 1991 xxx.xx
Argentina 1992 xxx.xx
Argentina 1993 xxx.xx
Brazil 1990 xxx.xx
Brazil 1991 xxx.xx
Brazil 1992 xxx.xx
Brazil 1993 xxx.xx

Once again thank you for your time.

Kind regards,

Ryan