Free Access Week - Data Engineering + BI
Data Engineering and BI courses are free this week!
Free Access Week - Jun 2-8

apollo (version 0.1.0)

apollo_combineModels: Combines separate model components.

Description

Combines model components to create probability for overall model.

Usage

apollo_combineModels(P, apollo_inputs, functionality)

Arguments

P

List of vectors, matrices or 3-dim arrays. Likelihood of the model components.

apollo_inputs

List grouping most common inputs. Created by function apollo_validateInputs.

functionality

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.

Value

Argument P with an extra element called "model", which is the product of all the other elements. Shape depends on argument functionality.

  • "estimate": Returns argument P with an extra component called "model", which is the product of all other elements of P.

  • "prediction": Returns argument P without any change.

  • "validate": Same as "estimate".

  • "zero_LL": Same as "estimate".

  • "conditionals": Same as "estimate".

  • "output": Same as "estimate".

  • "raw": Returns argument P without any change.

Details

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.