Analysis of categorical-variable datasets with missing values