R script for doing Guttman scaling and testing the statistical significance of implicational hierarchies, including cases where some cells are empty. The script was used in Aldai & Wichmann, "Statistical observations on hierarchies of transitivity" (under submission, Folia Linguistica). The repository also includes the four data matrices used in that paper.