Combines separate model components.
Combines model components to create likelihood for overall model.
apollo_combineModels( P, apollo_inputs, functionality, components = NULL, asList = TRUE )
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. Setting instructing Apollo what processing to apply to the likelihood function. This is in general controlled by the functions that call apollo_probabilities, though the user can also call apollo_probabilities manually with a given functionality for testing/debugging. Possible values are:
|
components |
Character vector. Optional argument. Names of elements in P that should be multiplied to construct the whole model likelihood. If a single element is provided, it is interpreted as a regular expression. Default is to include all components in P. |
asList |
Logical. Only used if |
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, except where these functions are called inside any latent class components of the overall model.
Argument P
with (for most functionalities) an extra element called "model", which is the product of all the other elements. Shape depends on argument functionality
.
"components"
: Returns P
without changes.
"conditionals"
: Returns P
with an extra component called "model"
, which is the product of all other elements of P
.
"estimate"
: Returns P
with an extra component called "model"
, which is the product of all other elements of P
.
"gradient"
: Returns P
containing the gradient of the likelihood after applying the product rule across model components.
"output"
: Returns P
with an extra component called "model"
, which is the product of all other elements of P
.
"prediction"
: Returns P
without changes.
"preprocess"
: Returns P
without changes.
"raw"
: Returns P
without changes.
"validate"
: Returns P
with an extra component called "model"
, which is the product of all other elements of P
.
"zero_LL"
: Returns P
with an extra component called "model"
, which is the product of all other elements of P
.
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.