What are some ways to merge panel data in STATA?
-
-
Answer:
I am assuming you are using Stata 11 or 12 or 13 and that you are conversant with Stata terminologies. No matter what type of data you are merging (cross section or panel data or time series) you need some type of identifier variable in both files. The identifier variable (may be the name of the entities about whom the dataset is) must have the same name in both files and both datasets must be sorted using this variable. Once you have ensured that you can simply use the merge command in its four forms that is either use xyz.dta merge 1:1 id_var using abc.dta or use xyz.dta merge 1:m id_var using def.dta or use xyz.dta merge m:1 id_var using ghi.dta I have no experience with the m:m merge may be someone else can help with that. If you want more to the point help, you need to provide some information about your two datasets.Specifically you need to provide me with the following information For both datasets -is this panel data? -range of years -what is the variable that stores the names/ids of the entities.
Krishanu Karmakar at Quora Visit the source
Other answers
It is like time-series or cross-sectional data, but usually you will need two ids, one for panel and one for time. it will look like merge 1:1 idcode year using xxxx.dta, for detail check "help merge" in Stata. Usually, berfore merge two panel datasets, you may need to shape both into long format, check "help reshape" in Stata. And you can also merge cs with panel, ts with panel and panel with panel.
Shan Hua
Related Q & A:
- What are some ways to make extra money while in college?Best solution by Yahoo! Answers
- What are some ways to make money?Best solution by Yahoo! Answers
- What are the ways to determine the credibility of online information?Best solution by Yahoo! Answers
- What are some ways i can style my hair?Best solution by Yahoo! Answers
- What's the difference between a static data member and a regular data member?Best solution by eHow old
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.