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: Appending unique cases based on two variables


From   Nick Cox <[email protected]>
To   [email protected]
Subject   Re: st: Re: Appending unique cases based on two variables
Date   Thu, 9 Aug 2012 17:34:51 +0100

-append- just appends files, and thus observations. It is indifferent
to similarities or differences. In that sense it is opposite to
-merge-. You can clean up afterwards in any way you want, but
-duplicates- is intended to offer a lot of fine control.

Nick

On Thu, Aug 9, 2012 at 5:30 PM, Logan-Greene, Patricia
<[email protected]> wrote:
> Append. This is a second step which will retrieve unmerged cases.
>
> Thanks,
> PLG
>
>
> Sent from my Galaxy S®III
>
> Nick Cox <[email protected]> wrote:
> Is this an -append- or -merge- problem?
>
> On Thu, Aug 9, 2012 at 4:50 PM, Logan-Greene, Patricia
> <[email protected]> wrote:
>> Hello,
>>
>> I am doing a fairly complicated merge between two sets of data (from criminal court records) that each contain an ID number and dates (along with many other variables). Here's some background:
>> 1. The two files represent a) an assessment, given at approximately the same time as the beginning of probation, and b) discharge records.
>> 2. Each file contains ID numbers that can be used to match individuals across files. The ID number can appear multiple times in each dataset (multiple entries reflect recidivism).
>> 3. The entries are dated, which represents for a) the date on which the assessment in given, and for b) the official start date for probation. Although there are multiple entries for many ID numbers, there is only one instance of a particular ID and a particular date in each file.
>> 2. As the dates don't match identically, we conducted a fuzzy match that paired assessment entries with discharge information (based on the beginning of probation) when the dates were within 6 weeks of each other.
>> 3. We now need to add the unique cases from the assessment data (that may represent, for example, an incomplete probation). I know how to append unique cases based on a single identifier, but not with two. Will append even work if there are duplicates for one of the identifiers?
>>
>> Can anyone help?
>>
>> Thanks!
>>
>>
>>
>> *
>> *   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/
>
> *
> *   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/


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