Amadou,
You write that you have no problem with the merge when you work
interactively. I assume that this means you type commands into Stata
and execute them one at a time. Why don't you use the same commands
in your do-file?
Friedrich
--- [email protected] wrote:
>
> Hi,
> 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?
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/