/* Many-to-one merge on specified key variables */ /* Describe the individual datasets */ desc using merged-md-dc-va desc using countybirths use merged-md-dc-va, clear desc merge m:1 statename countyname using countybirths keep if _merge==3 drop _merge /* Examine the merge outcome */ desc list statename countyname pop00 pop01 births4_7_00 births01, clean noobs /* Save the file */ save merged-births-deaths, replace