apollo_ownModel {apollo} | R Documentation |
Calculates own model probabilities
Description
Receives functions or expressions for each functionality so that a user-defined model can interface with Apollo.
Usage
apollo_ownModel(ownModel_settings, functionality)
Arguments
ownModel_settings |
List of arguments. Only likelihood is mandatory.
|
functionality |
Character. Setting instructing Apollo what processing to apply to the likelihood function. This is in general controlled by the functions that call
|
Value
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"
: List containing the likelihood and gradient of the model component. -
"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 probability of the chosen alternative. -
"preprocess"
: Returns a list with pre-processed inputs, based onmnl_settings
. -
"validate"
: Same as"estimate"
, but it also runs a set of tests to validate the function inputs. -
"raw"
: Same as"prediction"
-
"report"
: 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.