Statalist The Stata Listserver

[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: Merge question.

From   "Nick Cox" <>
To   <>
Subject   st: RE: Merge question.
Date   Wed, 30 Aug 2006 22:19:51 +0100

Without ruling out the possibility that a -merge- 
expert can give you useful advice, this still 
looks like a guessing game in which guessing is no 

You give us lots of details, but still nothing 
concrete about your datasets or your .do file. 

A small version in which your problem is evident
is the ideal here.  

Naturally, I realise that you are inhibited by
the Statalist rule of not sending attachments, 
but there are alternatives: 

0. Include a listing of your .do file.

1. Contact tech support at StataCorp. 

2. Put the files on a website so that anyone 
interested can download. 

3. Offer to send the files to volunteer testers 
(not me). 


>  I am trying to merge 2 datasets.
>  But everytime, I get different results
>  (_m==3 has 83 observations in the
>  first time, 97 in the second, 100 in the
>  third and 96 in the fourth, and so on).
>  I tried to set seed and made my sort, stable.
>  With no success. I also tried to recast double
>  my merging identifier. No success. I tried to
>  tostring it. No success either.
>  Any hints why I obtain these various results?
>  I verified in both Stata and Excel.
>  I do not understand why Stata marked 3 to some
>  observations that belonged to both datasets in the
>  first trial and not in the second time.
>  Best regards.
>  Amadou.
>  PS: When I work interractivelly, I do not have that problem.
>  I have 96 observations that matched. So what I am doing
>  wrong in my stata do file?

*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index