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: Asking: choose between collapse and sort,copy-paste


From   Maarten Buis <[email protected]>
To   [email protected]
Subject   Re: st: Asking: choose between collapse and sort,copy-paste
Date   Fri, 2 Sep 2011 18:46:36 +0200

On Fri, Sep 2, 2011 at 5:41 PM, Yun wrote:
> I am using stata 11.0
> I plan to merge some files which have different unique ID.
> All the unique IDs are in string.
>
> So, i have in a file three different columns as ID: ID1, ID2, & school type
>
> And in other file, the column is: ID1, ID2
>
> However, I supposed that school types data prevents me to merge between files.
>
>
> I use this command: sort varlists, stable
>
> Then i copy and paste the same type or level in a new column within the same file. I do not know whether this is the correct way to do it.

That sounds like the perfect recipe for completely and utterly
destroying your data. So do _not_ do that.

There are some excellent tips on how to check what went wrong with
-merge- here: <http://blog.stata.com/2011/04/18/merging-data-part-1-merges-gone-bad/>
and here: <http://blog.stata.com/2011/05/27/merging-data-part-2-multiple-key-merges/>.

Hope this helps,
Maarten

--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany


http://www.maartenbuis.nl
--------------------------
*
*   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