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:combining datasets


From   Nick Cox <[email protected]>
To   [email protected]
Subject   Re: st:combining datasets
Date   Fri, 17 Aug 2012 10:03:03 +0100

This is a repost of a previous question which no-one answered. That is
certainly allowed, but the FAQ recommends that you wonder why no-one
answered.  In this case, I imagine that many people thought that this
is a -merge- problem but were not inclined to work out the detailed
syntax. So, -help merge-.

Nick

On Fri, Aug 17, 2012 at 7:53 AM, Kenisha Russell
<[email protected]> wrote

> Can someone please help me to solve the issue I am having with combining my datasets.
> Take for example, that I have the following three data sets.
>
> Dataset 1
> ID      year    month   educ    age
> A       2005    8       Secondary       21
> A       2005    9       Secondary       21
> A       2005    10      Secondary       21
> A       2005    11      Secondary       21
> A       2005    12      Secondary       21
> A       2006    1       Secondary       22
> A       2006    2       Secondary       22
>
> Dataset 2
> ID      Reg_year        Reg_month       Reg_day
> A       2002    8       1
>
> Dataset 3
> ID          status-year         status_ month   status_ day     emp_status
> A       2005    9       3       internship
> A       2006    2       1       employed
>
>
> What I would like to do is create one  large dataset organized as below, so I would appreciate any ideas and or suggestions on how to do this.
>
> ID      year    month   educ    Reg_year        Reg_month       Reg_day   status_year  status_ month  status__ day    emp_status
> A       .       .       .       2002    8       1       .       .       .       .
> A       2005    8       Secondary                               .       .       .       .
> A       2005    9       Secondary                               2005    9       3       internship
> A       2005    10      Secondary                               .       .       .       .
> A       2005    11      Secondary                               .       .       .       .
> A       2005    12      Secondary                               .       .       .       .
> A       2006    1       Secondary                               .       .       .       .
> A       2006    2       Secondary                               2006    2       1       employed
>
*
*   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