Hierarchical marginal models with latent uncertainty