Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Merging longitudinal data set


From   Andreas Jensen <[email protected]>
To   [email protected]
Subject   st: Merging longitudinal data set
Date   Fri, 16 Jul 2010 23:59:40 +0200

Hi Statalist.

I'm a new Stata user (previously only used R) and I'm working on a
project involving a longitudinal data set. There are two waves each
contained in its own data file and there is a common ID variable which
is consistent among the waves. I'm trying to wrap my head around the
merge command and I'm sure this is a fairly basic question. I,
however, would appreciate some confirmation on that what I'm doing is
hopefully correct.

What I'm troubled about is that there are people from wave 1 that has
dropped out when wave 2 was conducted (their ID does not exist in the
wave 2 data file), and there has been added additional people in wave
2 that aren't present in wave 1 (their ID does not exist in the wave 1
data file).

I have sorted each data file according to the ID variable and then
executed a merge 1:1 on the ID with wave 1 as master. I get the
following output.

    Result                           # of obs.
    -----------------------------------------
    not matched                        28,046
        from master                    12,373  (_merge==1)
        from using                     15,673  (_merge==2)

    matched                            18,742  (_merge==3)
    -----------------------------------------

So assuming that my command is correct, is it then true that there are
18742 individuals in both waves, 12373 individuals which has dropped
out after wave 1 and 15673 individuals that have been added in wave 2?

Thanks in advance,
Andreas Jensen
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index