SMS dit: Linear statistical analysis of discrete data