From the course: Introduction to Stata

Unlock the full course today

Join today to access over 24,800 courses taught by industry experts.

Merging and appending

Merging and appending - Stata Tutorial

From the course: Introduction to Stata

Merging and appending

- [Instructor] In this session, we're going to ask ourselves the question, how can we merge two or more data sets together in Stata? Combining data sets is a common feature of data analysis, and imagine that you have multiple data sets, and you want to combine these. How can we combine these in Stata? It's actually very simple to do in Stata, and Stata will not give you any problems even when merging extremely large data sets in the gigabyte range. However, from experience, I've noticed that mistakes are often the result of a lack of understanding of what exactly is being combined, and what the intended outcome is. The key commands that we're going to introduce in this session are append and merge. Append appends data sets, whilst merge merges them. Let me explain to you the difference in the next two slides. Append adds observations to existing variables. Imagine that we have two data sets, the master data set and the…

Contents