Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Merging many waves of panel data

    I am currently using the National Child Development Survey (1958-) to analyse the impact of height, weight and marriage on wages. There are 6 waves of data which are relevant to my study and need to be merged (eventually!). Firstly I imagine I need to go through each wave and only keep the variables relevant to my analysis using the keep command, my first question is how do I approach this? Should I sequentially open each wave in stata, keep the relevant variables then save each new dataset to make merging at a later stage easier?

    As a side note some of the variables in certain waves need to be edited as the questions asked across the panel were not uniform. For example I will have to convert the weights in each wave to the same unit of measurement. Should I do this in the initial editing stage of each wave or wait until I have all my data together and then start to make the variables match.

    I apologise if I have explained my problem poorly, any help would be greatly appreciated.

    Thank you.

  • #2
    While I think it can be done either way, it is typically easier to clean up the individual data sets separately before putting them together. The reason is that each data set will typically require its own particular modifications. Once you have put them together, all of those modifications then have to be restricted with -if- statements to make them apply only to the particular parts of the combined data that need them. Doing that is both tedious and error-prone. So I generally try to clean up and prepare each data set separately first.

    That said, it is likely that you will be better off -append-ing your data sets than -merge-ing them. Using -merge- will give you a combined data set in wide layout, which will be difficult to use for analysis later. Using -append- will produce a combined data set in long layout, and that will be more suitable for the vast majority of analyses you will then carry out in Stata.

    Comment

    Working...
    X