apollo_weighting: Applies weights

Description Usage Arguments Value

View source: R/apollo_weighting.R

Description

Applies weights to individual observations in likelihood function.

Usage

1
apollo_weighting(P, apollo_inputs, functionality)

Arguments

P

List of vectors, matrices or 3-dim arrays. Likelihood of the model components.

apollo_inputs

List grouping most common inputs. Created by function apollo_validateInputs.

functionality

Character. Can take different values depending on desired output of apollo_probabilities.

  • "estimate" For model estimation, returns probabilities of chosen alternatives.

  • "prediction" For model predictions, returns probabilities of all alternatives.

  • "validate" Validates input.

  • "zero_LL" Return probabilities with all parameters at zero.

  • "conditionals" For conditionals, returns probabilities of chosen alternatives.

  • "output" Checks that the model is well defined.

  • "raw" For debugging, returns probabilities of all alternatives

Value

The likelihood (i.e. probability in the case of choice models) of the model in the appropriate form for the given functionality, multiplied by individual-specific weights.


apollo documentation built on Feb. 25, 2021, 5:05 p.m.