| apollo_cnl | R Documentation |
Calculates the probabilities of a Cross-nested Logit model and can also perform other operations based on the value of the functionality argument.
apollo_cnl(cnl_settings, functionality)
cnl_settings |
List of inputs of the CNL model. User input is required for all settings except those with a default or marked as optional.
|
functionality |
Character. Setting instructing Apollo what processing to apply to the likelihood function. This is in general controlled by the functions that call
|
For the model to be consistent with utility maximisation, the estimated value of the lambda parameter of all nests
should be between 0 and 1. Lambda parameters are inversely proportional to the correlation between the error terms of
alternatives in a nest. If lambda=1, there is no relevant correlation between the unobserved
utility of alternatives in that nest.
Alpha parameters inside cnlStructure should be between 0 and 1. Using a transformation to ensure
this constraint is satisfied is recommended for complex structures (e.g. logistic transformation).
The returned object depends on the value of argument functionality as follows.
"components": Same as "estimate"
"conditionals": Same as "estimate"
"estimate": vector/matrix/array. Returns the probabilities for the chosen alternative for each observation.
"gradient": Not implemented.
"output": Same as "estimate" but also writes summary of input data to internal Apollo log.
"prediction": List of vectors/matrices/arrays. Returns a list with the probabilities for all alternatives, with an extra element for the chosen alternative probability.
"preprocess": Returns a list with pre-processed inputs, based on cnl_settings.
"raw": Same as "prediction".
"report": List with tree structure and choice overview.
"shares_LL": vector/matrix/array. Returns the probability of the chosen alternative when only constants are estimated.
"validate": Same as "estimate".
"zero_LL": vector/matrix/array. Returns the probability of the chosen alternative when all parameters are zero.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.