Checks that likelihoods (i.e. probabilities in the case of choice models) are in the appropiate format to be returned.
apollo_prepareProb(P, apollo_control, functionality)
List. Each element contains the probabilities of a component of the model. Should contain one element called "model".
List. Estimation settings. See apollo_estimate.
Character. Can take different values depending on desired output of apollo_probabilities
.
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
The likelihood (i.e. probability in the case of choice models) of the model in the appropriate form for the given functionality.
This function should be called inside apollo_probabilities
, near the end of it, just before return(P)
and apollo_detach()
.
This function only performs checks on the shape of P, but does not change its values in any way.