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]

Re: st: Merging longitudinal data set


From   Abhimanyu Arora <[email protected]>
To   [email protected]
Subject   Re: st: Merging longitudinal data set
Date   Sat, 17 Jul 2010 00:11:42 +0200

Yes 18742 IDs were matched in both waves, 12373 IDs only in master
dataset (wave 1),15673 IDs only in using dataset (wave 2). See
http://www.stata.com/help.cgi?merge

On Fri, Jul 16, 2010 at 11:59 PM, Andreas Jensen <[email protected]> wrote:
> 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/
>

*
*   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