Announcement

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

  • merging/combining two longitudinal data sets?

    Hi all,

    I'm a very green stata user and not even sure where to begin with my datasets. I have two datasets that ostensibly collect the same data - testing events for unique individuals over time - but were captured in different ways. One data set, lets call it the master, has data (mainly date and test outcome) for each testing event by unique ID. The other data set also records same testing events by same IDs and has other demographic etc info that I want to use. However, the testing date and outcome data in the second dataset is less reliable, so what I want to do is to 'attach' the demographic data and variables from the second data base to the testing info (date, outcome) in the master by the unique id. The other issue is not all of the records in the master data appear in the second dataset.

    So beyond identifying what I need to do, I have zero idea how to enact this. Can anyone point me in the right direction, even by suggesting the commands I might use so I can do some more targeted googling?

    Many thanks!

  • #2
    Welcome to Statalist, and to Stata.

    It sounds like what you want to do is use Stata's merge command. But for goodness sake, why would you use Google to find out about Stata when Stata provides such good documentation?

    As a new user of Stata, let me give you the following advice I often give to members who identify as new to Stata. When I began using Stata in a serious way, I started - as others here did - by reading my way through the Getting Started with Stata manual relevant to my setup. Chapter 18 then gives suggested further reading, much of which is in the Stata User's Guide, and I worked my way through much of that reading as well. All of these manuals are included as PDFs in the Stata installation (since version 11) and are accessible from within Stata - for example, through Stata's Help menu. The objective in doing this was not so much to master Stata as to be sure I'd become familiar with a wide variety of important basic techniques, so that when the time came that I needed them, I might recall their existence, if not the full syntax, and know how to find out more about them in the help files and manual.

    Stata supplies exceptionally good documentation that amply repays the time spent studying it - there's just a lot of it. The path I followed surfaces the things you need to know to get started in a hurry and to work effectively.

    Comment

    Working...
    X