Calculates class allocation probabilities for a Latent Class model
Calculates class allocation probabilities for a Latent Class model
Calculates class allocation probabilities for a Latent Class model using a Multinomial Logit model and can also perform other operations based on the value of the functionality argument.
apollo_classAlloc(classAlloc_settings)
Arguments
classAlloc_settings: List of inputs of the MNL model. It should contain the following.
‘avail’ : Named list of numeric vectors or scalars. Availabilities of classes, one element per class Names of elements must match those in classes. Values can be 0 or 1. These can be scalars or vectors (of length equal to rows in the database). A user can also specify avail=1 to indicate universal availability, or omit the setting completely.
‘componentName’ : Character. Name given to model component. If not provided by the user, Apollo will set the name automatically according to the element in P to which the function output is directed.
‘rows’ : Boolean vector. Consideration of which rows to include. Length equal to the number of observations (nObs), with entries equal to TRUE for rows to include, and FALSE for rows to exclude. Default is "all", equivalent to rep(TRUE, nObs).
‘utilities’ : Named list of deterministic utilities . Utilities of the classes in class allocation model. Names of elements must match those in avail, if provided.
Returns
The returned object depends on the value of argument functionality, which it fetches from the calling stack (see apollo_validateInputs ).
‘"components"’ : Same as "estimate".
‘"conditionals"’ : Same as "estimate".
‘"estimate"’ : List of vector/matrices/arrays with the allocation probabilities for each class.
‘"gradient"’ : List containing the likelihood and gradient of the model component.
‘"output"’ : Same as "estimate".
‘"prediction"’ : Same as "estimate".
‘"preprocess"’ : Returns a list with pre-processed inputs, based on classAlloc_settings.
‘"raw"’ : Same as "estimate".
‘"report"’ : Same as "estimate".
‘"shares_LL"’ : List with probabilities for each class in an equal shares setting.
‘"validate"’ : Same as "estimate", but it also runs a set of tests to validate the function inputs.
‘"zero_LL"’ : List with probabilities for each class in an equal shares setting.