|
Hello Dear All,
I have a dataset with duplicate clientid.I want to report these duplicate client ids but some of them under some condition are ok and I don't want to report them.I put a flag for one of them and I want to except all clientids with this flag.For example: Client Id Flag 3315 1 3315 1 3315 0 now I want to say if even the flag of one of them is 0 , don't report this id as a duplcate. Do you have any idea?? Thank you Behnaz Shirazi _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ |
|
How about creating a new id that gives those flagged a slightly
different id? Eg., COMPUTE newid=id. If (flag=0) newid=id - 90000000. And then run the duplicate report on newid. What do you think? Bozena Bozena Zdaniuk, Ph.D. University of Pittsburgh UCSUR, 6th Fl. 121 University Place Pittsburgh, PA 15260 Ph.: 412-624-5736 Fax: 412-624-4810 email: [hidden email] -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of behnaz shirazi Sent: Tuesday, May 22, 2007 1:54 PM To: [hidden email] Subject: Duplicates Hello Dear All, I have a dataset with duplicate clientid.I want to report these duplicate client ids but some of them under some condition are ok and I don't want to report them.I put a flag for one of them and I want to except all clientids with this flag.For example: Client Id Flag 3315 1 3315 1 3315 0 now I want to say if even the flag of one of them is 0 , don't report this id as a duplcate. Do you have any idea?? Thank you Behnaz Shirazi _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ |
|
In reply to this post by behnaz shirazi-2
At 01:54 PM 5/22/2007, behnaz shirazi wrote:
>I have a dataset with duplicate clientid. I want to report these >duplicate client ids but some [duplicates] are ok and I don't want to >report them.I put a flag for one [instance] of them and I want to >except all clientids with this flag. This is SPSS 15 draft output (WRR-Not saved separately): |-----------------------------|---------------------------| |Output Created |22-MAY-2007 16:14:28 | |-----------------------------|---------------------------| Client_ID Flag 3315 1 3315 1 3315 0 3316 0 3317 0 3317 0 3318 0 3319 1 3320 0 Number of cases read: 9 Number of cases listed: 9 AGGREGATE OUTFILE=* /BREAK = Client_ID /OCCUR 'Occurrences of this ID' = NU /FLAG 'Dups OK for this ID' = MAX(FLAG). LIST. List |-----------------------------|---------------------------| |Output Created |22-MAY-2007 16:14:28 | |-----------------------------|---------------------------| Client_ID OCCUR FLAG 3315 3 1 3316 1 0 3317 2 0 3318 1 0 3319 1 1 3320 1 0 Number of cases read: 6 Number of cases listed: 6 SELECT IF OCCUR GT 1 AND FLAG EQ 0. LIST. List |-----------------------------|---------------------------| |Output Created |22-MAY-2007 16:14:28 | |-----------------------------|---------------------------| Client_ID OCCUR FLAG 3317 2 0 Number of cases read: 1 Number of cases listed: 1 =================== APPENDIX: Test data =================== * ................................................................. . * ................. Test data ..................... . DATA LIST LIST SKIP = 1 /Client_ID Flag. BEGIN DATA Client_Id Flag 3315 1 3315 1 3315 0 3316 0 3317 0 3317 0 3318 0 3319 1 3320 0 END DATA. FORMATS Client_ID (F6) Flag (F2). . /**/ LIST /*-*/. * ................. Post after this point ..................... . |
| Free forum by Nabble | Edit this page |
