ModelMultinomialLogit: ModelMultinomialLogit

Description Arguments Details Value Examples

Description

A multinomial logit model

Initialisation function

This predict method returns probabilities generated from the parameters of this Model object.

Arguments

params

a named numeric vector.

formula

a formula object of class mlogit::mFormula, Formula::Formula, or formula.

preprocessing_fn

a pre-processing function that gets applied to the data given to the predict method before making the prediction.

newdata

(data.frame())
new data to generate probabilities conditioned on its explanatory variables.

chooser_id_col

(character(1))
column name of the chooser id

choice_id_col

(character(1))
column name of the choice id

Details

This model object is use to create a multinomial model using already estimated parameters.

Value

a data.frame object with three columns: chooser_id (integer()), choice_id (integer()), linear_comb (numeric()), prob (numeric()). Note that, 'linear_comb' stands for linear combination (i.e. $$B1 * x1 + B2 * x2$$).

Examples

1
2
3
4
if (requireNamespace("mlogit")) {


}

dymium-org/dymiumCore documentation built on July 18, 2021, 5:10 p.m.