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: RE: Unexpected error from -merge-


From   Jacob-Jan Koopmans <[email protected]>
To   [email protected]
Subject   Re: st: RE: Unexpected error from -merge-
Date   Mon, 23 Sep 2013 21:05:07 +0200

Quite a stupid that I missed that!
Thanks a lot, it immediatelly solved my problems.

Regards,
Jacob-Jan Koopmans

On Mon, Sep 23, 2013 at 5:47 PM, Joe Canner <[email protected]> wrote:
> By default when you do -duplicates report-, it is looking for duplicates with respect to every variable in your data set, which is why you have all unique records.  What you want is -duplicates report actpsid- which will give you just the duplicates with respect to the variable you are trying to merge on.
>
> Regards,
> Joe Canner
> Johns Hopkins University School of Medicine
>
> -----Original Message-----
> From: [email protected] [mailto:[email protected]] On Behalf Of Jacob-Jan Koopmans
> Sent: Monday, September 23, 2013 11:21 AM
> To: [email protected]
> Subject: st: Unexpected error from -merge-
>
> Dear list members,
>
> I am receiving an unexpected error when merging data.
> I am using stata 12.
>
> I am trying to merge data in the following way:
> "sort actpsid
> merge 1:m actpsid using "cbhiind" ".
>
> This, however, results in the following error:
> "variable actpsid(my individual identifier) does not uniquely identify observations in the master data r(459)."
> This would normally suggest(as far as I know), there are duplicates of actpsid in the master data. However, when checking for duplicates by
> using: duplicates report. I receive the following nice report:
>
> "Duplicates in terms of all variables
> --------------------------------------------------------
>    copies | observations       surplus
> ----------+--------------------------------------------
>         1 |         8772             0
> --------------------------------------------------------"
>
> Therefore, I suppose the error is not resulting from duplicates in my identifier variable.
>
> I would thus like to ask whether there are other reasons why the above mentioned error appears.
>
> Kind regards,
> Jacob-Jan Koopmans
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/faqs/resources/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/faqs/resources/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/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index