Analyzing categorical data