Combines model components to create probability for overall model.
apollo_combineModels(P, apollo_inputs, functionality)
List of vectors, matrices or 3-dim arrays. Likelihood of the model components.
List grouping most common inputs. Created by function apollo_validateInputs.
Character. Can take different values depending on desired output.
"estimate": For model estimation, returns likelihood of model.
"prediction": For model predictions, returns probabilities of all alternatives.
"validate": Validates input.
"zero_LL": Return probabilities with all parameters at zero.
"conditionals": For conditionals, returns likelihood of model.
"output": Checks that the model is well defined.
"raw": For debugging, returns probabilities of all alternatives.
Argument P
with an extra element called "model", which is the product of all the other elements.
This function should be called inside apollo_probabilities after all model components have been produced.
It should be called before apollo_avgInterDraws, apollo_avgIntraDraws, apollo_panelProd and apollo_prepareProb, whichever apply.