apollo_ol | R Documentation |
Calculates the probabilities of an Ordered Logit model and can also perform other operations based on the value of the functionality
argument.
apollo_ol(ol_settings, functionality)
ol_settings |
List of settings for the OL model. It should include the following.
|
functionality |
Character. Setting instructing Apollo what processing to apply to the likelihood function. This is in general controlled by the functions that call
|
This function estimates an Ordered Logit model of the type:
y* = V + epsilon
outcomeOrdered = 1 if -Inf < y* < tau[1]
2 if tau[1] < y* < tau[2]
...
maxLvl if tau[length(tau)] < y* < +Inf
Where epsilon is distributed standard logistic, and the values 1, 2, ..., maxLvl can be
replaces by coding[1], coding[2], ..., coding[maxLvl].
The behaviour of the function changes depending on the value of the functionality
argument.
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 possible levels, with an extra element for the probability of the chosen alternative.
"preprocess"
: Returns a list with pre-processed inputs, based on ol_settings
.
"raw"
: Same as "prediction"
"report"
: Dependent variable overview.
"shares_LL"
: vector/matrix/array. Returns the probability of the chosen alternative when only constants are estimated.
"validate"
: Same as "estimate"
, but it also runs a set of tests to validate the function inputs.
"zero_LL"
: Not implemented. Returns a vector of NA with as many elements as observations.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.