apollo_conditionals {apollo}  R Documentation 
Calculates posterior expected values (conditionals) of random coefficient models (continuous or discrete mixtures/latent class)
apollo_conditionals(model, apollo_probabilities, apollo_inputs)
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_inputs 
List grouping most common inputs. Created by function apollo_validateInputs. 
This functions is only meant for use with models using either continuous distributions or latent classes, not both at the same time
Depends on whether the model uses continuous mixtures or latent class.
If the model contains a continuous mixture, the function returns a list of matrices. Each matrix has dimensions nIndiv x 3. One matrix per random component. Each row of each matrix contains the indivID of an individual, and the posterior mean and s.d. of this random component for this individual.
If the model contains latent classes, the function returns a matrix with the posterior class allocation probabilities for each individual.
If the model contains both continuous mixtures and latent classes, the function fails.