Hello,
I'm trying to combine two cross-sectional data sets using merge. The reason why I'm using merge is because I want to create a balanced panel data set, using keep(match). The datasets that I'm working, are the scores from a standardized test applied to schools, so each school has an unique "id" and I'd like to combine the data from different years, so I can create a panel data. The problem is that when I use the merge command, it doesn't add another row for the scores of the prior year (which is the dataset that I'm adding), it keeps the scores from the master data set.
I'd really appreciate your help!
I'm trying to combine two cross-sectional data sets using merge. The reason why I'm using merge is because I want to create a balanced panel data set, using keep(match). The datasets that I'm working, are the scores from a standardized test applied to schools, so each school has an unique "id" and I'd like to combine the data from different years, so I can create a panel data. The problem is that when I use the merge command, it doesn't add another row for the scores of the prior year (which is the dataset that I'm adding), it keeps the scores from the master data set.
Code:
clear all global path "/Users/fernandobastidasespinoza/Desktop/Universidad/2022 S2/Tesis/Datos/bbdd_simce" cd "$path" use "$path/simce8b2019_rbd.dta" merge 1:1 rbd using "$path/simce8b2017_rbd_publica_final.dta", keep(match) force
Comment