How can I merge and append these data files (csv, dta and excel) where there are different number of observations in the different files?
Thank you.
Thank you.
import excel TeachingRatings_Beauty.xls , firstrow clear save beauty, replace import delimited TeachingRatings_courseeval_200_463.csv , clear save eval2, replace import delimited TeachingRatings_courseeval_1_200.csv, clear append using eval2 save eval, replace //could skip but if the latter fails then you can just come back to this. if the data is small, then skip. joinby teacherid using beauty, unmatched(master) _merge(_merge_beauty) tab _merge_beauty joinby teacherid using TeachingRatings_age, unmatched(master) _merge(_merge_age) tab _merge_age joinby teacherid using TeachingRatings_femaleindicator.dta, unmatched(master) _merge(_merge_female) tab _merge_female save eval_final, replace
Comment