apollo_lcConditionals function

Calculates conditionals for latent class models.

Calculates conditionals for latent class models.

Calculates posterior expected values (conditionals) of class allocation probabilities for each individual.

apollo_lcConditionals(model, apollo_probabilities, apollo_inputs)

Arguments

  • model: Model object. Estimated model object as returned by function apollo_estimate .

  • apollo_probabilities: Function. Returns probabilities of the model to be estimated. Must receive three arguments:

    • ‘apollo_beta’ : Named numeric vector. Names and values of model parameters.
    • ‘apollo_inputs’ : List containing options of the model. See apollo_validateInputs .
    • ‘functionality’ : Character. Can be either ‘"components"’ , ‘"conditionals"’ , ‘"estimate"’ (default), ‘"gradient"’ , ‘"output"’ , ‘"prediction"’ , ‘"preprocess"’ , ‘"raw"’ , ‘"report"’ , ‘"shares_LL"’ , ‘"validate"’ or ‘"zero_LL"’ .
  • apollo_inputs: List grouping most common inputs. Created by function apollo_validateInputs .

Returns

A matrix with the posterior class allocation probabilities for each individual.

Details

This function can only be used with latent class models without continuous heterogeneity.

  • Maintainer: Stephane Hess
  • License: GPL-2
  • Last published: 2025-03-12