Calculates the likelihood of a Multiple Discrete Continuous Extreme Value (MDCEV) model with an outside good.
apollo_mdcevOutside(
V,
alternatives,
alpha,
gamma,
sigma,
cost,
avail,
continuousChoice,
budget,
functionality,
minConsumption = NA,
outsideName = "outside",
rows = "all",
componentName = "MDCEV"
)
Named list. Utilities of the alternatives. Names of elements must match those in argument 'alternatives'.
Character vector. Names of alternatives, elements must match the names in list 'V'.
Named list. Alpha parameters for each alternative, including for the outside good. As many elements as alternatives.
Named list. Gamma parameters for each alternative, excluding the outside good. As many elements as inside good alternatives.
Numeric scalar. Scale parameter of the model extreme value type I error.
Named list of numeric vectors. Price of each alternative. One element per alternative, each one as long as the number of observations or a scalar. Names must match those in alternatives
.
Named list. Availabilities of alternatives, one element per alternative. Names of elements must match those in argument 'alternatives'. Value for each element can be 1 (scalar if always available) or a vector with values 0 or 1 for each observation. If all alternatives are always available, then user can just omit this argument.
Named list of numeric vectors. Amount of consumption of each alternative. One element per alternative, as long as the number of observations or a scalar. Names must match those in alternatives
.
Numeric vector. Budget for each observation.
Character. Can take different values depending on desired output.
"estimate" Used for model estimation.
"prediction" Used for model predictions.
"validate" Used for validating input.
"zero_LL" Used for calculating null likelihood.
"conditionals" Used for calculating conditionals.
"output" Used for preparing output after model estimation.
"raw" Used for debugging.
Named list of scalars or numeric vectors. Minimum consumption of the alternatives, if consumed. As many elements as alternatives. Names must match those in alternatives
.
Character. Alternative name for the outside good. The first good is assumed to be the outside one. Default is "outside"
Boolean vector. Consideration of rows in the likelihood calculation, FALSE to exclude. Length equal to the number of observations (nObs). Default is "all"
, equivalent to rep(TRUE, nObs)
.
Character. Name given to model component.
The returned object depends on the value of argument functionality
as follows.
"estimate": vector/matrix/array. Returns the probabilities for the chosen alternative for each observation.
"prediction": A matrix with one row per observation, and means and s.d. of predicted consumptions.
"validate": Boolean. Returns TRUE if all tests are passed.
"zero_LL": Not applicable.
"conditionals": Same as "prediction".
"output": Same as "estimate" but also writes summary of choices into temporary file (later read by apollo_modelOutput
).
"raw": Same as "prediction".