Multiplies likelihood of observations from the same individual, or adds the log of them.
apollo_panelProd(P, apollo_control, functionality, work_in_logs, indivID)
List of probabilities. It must contain one element called "model" containing the full likelihood of the model.
List. Options controlling the running of the code.
See ?apollo_validatecontrol
for details.
Character. Can take different values depending on desired output.
For model estimation, returns probabilities of chosen alternatives.
For model predictions, returns probabilities of all alternatives.
Validates input.
Return probabilities with all parameters at zero.
For conditionals, returns probabilities of chosen alternatives.
Checks that the model is well defined.
For debugging, returns probabilities of all alternatives
Boolean. TRUE for higher numeric stability at the expense of computational time. Useful for panel models only. Default is FALSE.
Numeric vector. Vector with individual's ID. As long as the number of observations.
Probabilities at the individual level.
This function should be called inside apollo_probabilities only if the data has a panel structure. It should be called after apollo_avgIntraDraws if intra-individual draws are used.