Latent variable models for understanding user behavior in software applications