Bayesian latent class models with application to credit-scoring and capture-recapture data