margK function

Tube marginals of a three-way contingency table