Models for multivariate data with latent structures with application in regression and clustering