This paper provides a unified setting for factor models applied to panels of qualitative observations. This setting includes as special cases the single risk factor model and its multiple factor extensions used in credit risk analysis, the stochastic migration models used for rating dynamics and the factor models for prospective mortality tables. The behavior of these models when the cross-sectional dimension is large is considered and granularity adjustments for the maximum-likelihood estimators of the factor sensitivities are derived. These steps are necessary in order to analyze the effect of estimation risk on measures of credit portfolio risk. The methodology is illustrated by a Monte Carlo study of the finite sample properties of the estimators.