Nonloglinear marginal latent class models