View source: R/apollo_combineModels.R
| apollo_combineModels | R Documentation |
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
|
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.
"shares_LL": Returns P with an extra component called "model", which is the product of all other elements of P.
"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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.