preserve.
set printback=on.
* MEASUREMENT OF NONINDEPENDENCE IN STANDARD DYADIC DESIGNS
Inter3.sps - Categorical measures / Non tabulated data.
* Opened the file with the non tabulated data.
*\beginning of the program.
set printback=off.
save outfile=userdata.
oms/select tables/if commands=["crosstabs"]
subtypes=["case processing summary"]/destination viewer=no.
set printback=on.
/* Distinguishable members /*
set printback=off.
* Calculating kappa.
weight off.
compute Member1=x.1.
compute Member2=x.2.
crosstabs/tables=member1 by member2/statistic=kappa.
set printback=on.
/*Indistinguishable members /*
set printback=off.
* Tabulating data.
autorecode variables=x.1 x.2/into c1 c2.
compute cell=c1*1000+c2.
execute.
aggregate/outfile='file0'/break=cell/member2=max(c2)/count=n.
get file=file0.
compute member1=rnd(cell/1000).
execute.
* Averaging off-diagonal cells.
save outfile=file1.
sort cases by member2(a) member1(a).
compute count2=count.
execute.
delete variables member1 member2 count.
match files/file=*/file=file1.
compute meancount=mean(count2,count).
* Calculating kappa.
weight by meancount.
crosstabs/tables=member1 by member2/statistic=kappa/count asis.
delete variables count2 meancount cell.
get file=userdata.
save outfile=userdata.sav.
set printback=on.
*/end of the program.
restore.
*********************************************************************
* Reference:
*
* Alferes, V. R., & Kenny, D. A. (in press). SPSS programs for the
* measurement of nonindependence in standard dyadic designs.
* Behavior Research Methods [Submitted: 22-May-2008; Accepted
* for publication: 16-Jul-2008].
********************************************************************.