cheking files for discrepancies: final touch :-)

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

cheking files for discrepancies: final touch :-)

Gonzalo Kmaid
Hi all!

Jon Peck (SPSS) suggested the COMPDS extension command (requires SPSS
16.0.1, Phyton installed, Phyton integration plug-in, and the compds xml
and py files) for cheking two identical files entered by two separate
persons (double entry consistency check). Thanks again Jon!

The COMPDS works nicely. I creates a small report and it creates a bunch of
variables (named compare_var1 compare_var2, etc) at the end of the first
file being compared.

Each of the variables added (the compare_var1 to n) has 0´s all along the
entire file (all ids) if there are no discrepancies. But, if there is a
discrepancy, the compare_varN will have a 1 in that particular case (id=x).

The "final touch" that I am looking for, is some code to list for only
those variables where discrepancies do occur (vars having 1´s and not all
zeros) and a list of id cases where these discrepancies happen (id of the
cases where the 1´s are present). Otherwise I have to create frecuencies
for all vars being compared and manually go to the var and manually go to
id case.

Any help greatly appreciated (I found some code produced by Raynald to
delete vars having all zeros, but I am looking for one step further :-)

Gonzalo

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: cheking files for discrepancies: final touch :-)

Albert-Jan Roskam
Hi,

compute filter = max (compare_var1 to compare_var100).
filter by filter.
list var_of_interest $casenum.
filter off.

Or is that too simple?

Cheers!!
Albert-Jan


--- Gonzalo Kmaid <[hidden email]> wrote:

> Hi all!
>
> Jon Peck (SPSS) suggested the COMPDS extension
> command (requires SPSS
> 16.0.1, Phyton installed, Phyton integration
> plug-in, and the compds xml
> and py files) for cheking two identical files
> entered by two separate
> persons (double entry consistency check). Thanks
> again Jon!
>
> The COMPDS works nicely. I creates a small report
> and it creates a bunch of
> variables (named compare_var1 compare_var2, etc) at
> the end of the first
> file being compared.
>
> Each of the variables added (the compare_var1 to n)
> has 0´s all along the
> entire file (all ids) if there are no discrepancies.
> But, if there is a
> discrepancy, the compare_varN will have a 1 in that
> particular case (id=x).
>
> The "final touch" that I am looking for, is some
> code to list for only
> those variables where discrepancies do occur (vars
> having 1´s and not all
> zeros) and a list of id cases where these
> discrepancies happen (id of the
> cases where the 1´s are present). Otherwise I have
> to create frecuencies
> for all vars being compared and manually go to the
> var and manually go to
> id case.
>
> Any help greatly appreciated (I found some code
> produced by Raynald to
> delete vars having all zeros, but I am looking for
> one step further :-)
>
> Gonzalo
>
> =====================
> To manage your subscription to SPSSX-L, send a
> message to
> [hidden email] (not to SPSSX-L), with no
> body text except the
> command. To leave the list, send the command
> SIGNOFF SPSSX-L
> For a list of commands to manage subscriptions, send
> the command
> INFO REFCARD
>



      ____________________________________________________________________________________
Never miss a thing.  Make Yahoo your home page.
http://www.yahoo.com/r/hs

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: cheking files for discrepancies: final touch :-)

Peck, Jon
Albert-Jan's filter works fine to select only cases with discrepancies, but there is also an easier way.
COMPDS can create a summary variable for each case that contains the number of discrepancies in the case.  So you can write
COMPDS DS1=data1 DS2=data2 /DATA ID=idvar DIFFCOUNT=differencecount  etc.
Then you can filter on DIFFCOUNT > 0.
Since DIFFCOUNT will be sysmis if a case is present in only the first dataset, you might also want to include those cases in the filter:
COMPUTE filter = sysmis(differencecount) or differencecount > 0.

etc.

FREQUENCIES differencecount.
might also be illuminating.

HTH,
Jon Peck

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Albert-jan Roskam
Sent: Tuesday, March 18, 2008 3:56 AM
To: [hidden email]
Subject: Re: [SPSSX-L] cheking files for discrepancies: final touch :-)

Hi,

compute filter = max (compare_var1 to compare_var100).
filter by filter.
list var_of_interest $casenum.
filter off.

Or is that too simple?

Cheers!!
Albert-Jan


--- Gonzalo Kmaid <[hidden email]> wrote:

> Hi all!
>
> Jon Peck (SPSS) suggested the COMPDS extension
> command (requires SPSS
> 16.0.1, Phyton installed, Phyton integration
> plug-in, and the compds xml
> and py files) for cheking two identical files
> entered by two separate
> persons (double entry consistency check). Thanks
> again Jon!
>
> The COMPDS works nicely. I creates a small report
> and it creates a bunch of
> variables (named compare_var1 compare_var2, etc) at
> the end of the first
> file being compared.
>
> Each of the variables added (the compare_var1 to n)
> has 0´s all along the
> entire file (all ids) if there are no discrepancies.
> But, if there is a
> discrepancy, the compare_varN will have a 1 in that
> particular case (id=x).
>
> The "final touch" that I am looking for, is some
> code to list for only
> those variables where discrepancies do occur (vars
> having 1´s and not all
> zeros) and a list of id cases where these
> discrepancies happen (id of the
> cases where the 1´s are present). Otherwise I have
> to create frecuencies
> for all vars being compared and manually go to the
> var and manually go to
> id case.
>
> Any help greatly appreciated (I found some code
> produced by Raynald to
> delete vars having all zeros, but I am looking for
> one step further :-)
>
> Gonzalo
>
> =====================
> To manage your subscription to SPSSX-L, send a
> message to
> [hidden email] (not to SPSSX-L), with no
> body text except the
> command. To leave the list, send the command
> SIGNOFF SPSSX-L
> For a list of commands to manage subscriptions, send
> the command
> INFO REFCARD
>



      ____________________________________________________________________________________
Never miss a thing.  Make Yahoo your home page.
http://www.yahoo.com/r/hs

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD