Averages the likelihood across inter-individual draws.
apollo_avgInterDraws(P, apollo_control, functionality, indivID)
List. Contains the probabilities for each model component, for each inter-person draw.
Intra-person draws must have been averaged over on P
, before giving it as an argument to this function.
List. Contains options for the estimation See apollo_validatecontrol for details.
Character. Can take different values depending on desired output.
Used for model estimation.
Used for model predictions.
Used for validating input.
Used for getting null likelihood.
Used for getting conditionals.
Used for preparing output after model estimation.
Used for debugging.
Numeric vector. Vector with individual's ID. As long as the number of observations.
Average probability over inter-individual draws (shape depends on argument functionality
).
Returns P averaged across inter-individual draws for the chosen alternative.
Returns P averaged across inter-individual draws for all alternatives.
Returns P without changes.
Returns P without changes.
Returns P without changes, but checks its shape.
Returns the same than "estimate", but also prints a summary of estimation data.
Returns P without changes.
This function performs additional checks on the shape of the probabilities given as arguments.
The shape of P
should be consistent with the value of functionality
, but compliance is
assured if P
comes from apollo_mnl.
For functionality
values of "estimate", "zero_LL, "conditionals" and "output", P
should be a list of matrices,
with each matrix containing the likelihood of the chosen alternative.
For functionality
values of "prediction" and "raw", P
should be a list, with each of
its elements a list of matrices, and each matrix containing the likelihood of a different alternative.
For the functionality
value of "validate", P
can be anything, as it is not processed.