apollo_el: Calculates Exploded Logit probabilities

Description Usage Arguments Value

View source: R/apollo_el.R


Calculates the probabilities of an Exploded Logit model and can also perform other operations based on the value of the functionality argument. The function calculates the probability of a ranking as a product of Multinomial Logit models with gradually reducing availability, where scale differences can be allowed for.


apollo_el(el_settings, functionality)



List of inputs of the Exploded Logit model. It shoud contain the following.

  • "alternatives": Named numeric vector. Names of alternatives and their corresponding value in choiceVar.

  • "avail": Named list of numeric vectors or scalars. Availabilities of alternatives, one element per alternative. Names of elements must match those in alternatives. Values can be 0 or 1.

  • "choiceVars": List of numeric vectors. Contain choices for each position of the ranking. The list must be ordered with the best choice first, second best second, etc. It will usually be a list of columns from the database. Use value -1 if a stage does not apply for a given observations (e.g. when some individuals have shorter rankings).

  • "V": Named list of deterministic utilities . Utilities of the alternatives. Names of elements must match those in alternatives.

  • "scales": List of vectors. Scale factors of each Logit model. At least one element should be normalized to 1. If omitted, scale=1 for all positions is assumed.

  • "rows": Boolean vector. Consideration of rows in the likelihood calculation, FALSE to exclude. Length equal to the number of observations (nObs). Default is "all", equivalent to rep(TRUE, nObs).

  • "componentName": Character. Name given to model component.


Character. Can take different values depending on desired output.

  • "estimate": Used for model estimation.

  • "prediction": Used for model predictions.

  • "validate": Used for validating input.

  • "zero_LL": Used for calculating null likelihood.

  • "conditionals": Used for calculating conditionals.

  • "output": Used for preparing output after model estimation.

  • "raw": Used for debugging.


The returned object depends on the value of argument functionality as follows.

apollo documentation built on July 31, 2021, 5:08 p.m.