added function: "kstat" to assess similarity of categorical maps