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: Can I use Many to Many merge for this case


From   Nan Z <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: Can I use Many to Many merge for this case
Date   Sun, 26 Aug 2012 10:23:36 -0700 (PDT)

Hey Stata
users,
I know that
STATA manual suggest avoiding many to many merge. I would like to know for the
following situation what I should do. Any suggestion is appreciated.
My research
question requires to determine the main activity of an individual in a month. For
example, if one person spends more than half a month in working, he will be in
the status of Job. Or he will be in the status of training if he takes more
time on training. 
I have two
datasets-- training and job as following. As you can see that each individual
has more than one observation. This implies that they have at least one job or
participate in training at least once in the survey period. The tid/jid tells us
the training id or job id; t_sta/end is the start/ending time of training and
j_sta/end correspond to jobs. 
My question
is whether I can use many to many merge. Or there is other better way to do
it. Thanks for any suggestions. 
Best,
Nan 
 
Training:
Id tid t_sta t_end
1 1 01/05/2010 03/11/2010
1 2 05/20/2010 12/01/2010
2 1 03/05/2010 08/30/2010 
2 2 07/30/2010 01/18/2011
3 1 02/09/2010 05/19/2010
 
Id jid j_sta j_end wage
1 1 03/01/2010 04/30/2010 12
1 2 12/15/2010 03/15/2011 15
1 3 05/01/2010 03/11/2010 20
2 1 01/05/2010 03/31/2010 8
3 1  06/01/2010 07/11/2011 9
3 2  11/01/2010         12.5

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