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
Related Posts with Adding variable from one STATA data set to another
&, +, and logical idiosyncrasiesI don't really have a data question, but I'm quite fascinated about a recent thing I learned. Code:…
GMM xtabond2 with external IVsHello miracle makers, I would like to use GMM and external IVs at the same time and struggling to s…
Calculate total grants company_id year grant co_001 2003 1 co_001 2004 0 co_001 2005 1 co_001 2005 1 co_002 20…
Xtreg results in insufficient observationsHi everyone, I am currently running a regression where I am measuring the impact of factors on the r…
Can't correctly convert timeseries time variable daily to monthly format in STATA 17.Hello, I am a novice in stata, but I have spent several hours trying to solve this issue without any…
Subscribe to:
Post Comments (Atom)
0 Response to Adding variable from one STATA data set to another
Post a Comment