Functions

logit Namespace Reference

Functions

def logit_av_scale
 Compute the logit choice probability with utilities scaled according to the group.
def logit
 Compute the logit choice probability, where all alternatives are available.
def logit_scale
 Compute the logit choice probability with utilities scaled according to the group.

Function Documentation

def logit::logit (   V,
  choice 
)

Compute the logit choice probability, where all alternatives are available.

Parameters:
VA dictionary mapping each alternative id with the expression of the utility function.
choiceexpression producing the id of the chosen alternative.
Returns:
Choice probability for chosen alternative $i$ and individual in group $g$:

\[ \frac{e^{V_i}}{\sum_j e^{V_j}}\]

def logit::logit_av_scale (   V,
  availability,
  choice,
  group,
  scale 
)

Compute the logit choice probability with utilities scaled according to the group.

Parameters:
VA dictionary mapping each alternative id with the expression of the utility function.
availabilityA dictionary mapping each alternative id with its availability condition.
choiceexpression producing the id of the chosen alternative.
groupid of the group, or market segment.
scaleA dictionary mapping each group id with the expression providing the corresponding scale.
Returns:
Choice probability for chosen alternative $i$ and individual in group $g$:

\[ \frac{e^{\mu_g V_i}}{\sum_j a_j e^{\mu_g V_j}}\]

where $a_j$ is 1 if alternative $j$ is available, 0 otherwise, and $\mu_g$ is the scale parameter associated with group $g$.
def logit::logit_scale (   V,
  choice,
  group,
  scale 
)

Compute the logit choice probability with utilities scaled according to the group.

Parameters:
VA dictionary mapping each alternative id with the expression of the utility function.
choiceexpression producing the id of the chosen alternative.
groupid of the group, or market segment.
scaleA dictionary mapping each group id with the expression providing the corresponding scale.
Returns:
Choice probability for chosen alternative $i$ and individual in group $g$:

\[ \frac{e^{\mu_g V_i}}{\sum_j e^{\mu_g V_j}}\]

where $\mu_g$ is the scale parameter associated with group $g$.
 All Classes Namespaces Files Functions Variables