If you are looking for software to use, go to Huajun Software Park! software release
Location: front pageTutorial strategyTutorialComputer software tutorials How does Stata...

How to use Stata - Detailed introduction to the method of merging data with Stata

Author: Xiaoyuer Date: 2020-12-28

STATA
STATA-17.0 official version

science tools Storage: 856.71MB Time: 2022-04-18

Software introduction: Stata official version is a very excellent practical science statistics software. Stata official version is powerful, efficient and professional, and provides data analysis...

Download now

Maybe some friends still don’t know how to use Stata to merge data? So for those who don’t know, come and take a look at the detailed method of merging data with Stata shared by the editor. I hope that through the study of this tutorial, it can be helpful to everyone. help.

Use the merge command syntax: merge [varlist] using filename [filename...] [optione]; where [varlist] represents the new variable to be merged, and using filename refers to the file path to be merged with the original file.

Stata screenshot

First open the first source file water1.dta, sort it by year, and then save it in overwrite mode

Open the second source file water2.dta and sort it by year.

Use the merge command to merge two files

Save the merged results and view the merged data

Stata screenshot

The above is the detailed method of merging data with Stata shared by the editor. Friends in need should not miss it.

Related articles