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
Yun <[email protected]>
To
"[email protected]" <[email protected]>
Subject
Re: st: Asking: choose between collapse and sort,copy-paste
Date
Sat, 3 Sep 2011 07:49:25 +1000
Thank you for the links.
I have read them but i did not understand what are the right steps to do merging. Especially if one or two files have 'type or level' as their third unique ID while the other files do not have it.
Regards,
Yun
On 3 Sep 2011, at 02:46, Maarten Buis <[email protected]> wrote:
> 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/
*
* 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/