This short paper proposes a general computing strategy to compute Kapp
a coefficients using the SPSS MATRIX routine. The method is based on t
he following rationale. If the contingency table is considered as a sq
uare matrix, then the observed proportions of agreement lie in the mai
n diagonal's cells, and their sum equals the trace of the matrix, wher
eas the proportions of agreement expected by chance are the joint prod
uct of marginals. The generalization to weighted kappa, which requires
an additional square matrix of disagreement weights, both matrices ha
ving the same order, becomes possible by the use of the Hadamard produ
ct-that is, the elementwise direct product of two matrices.