Adjusting for Errors in Classification and Measurement in the Analysis of Partly and Purely Categorical Data