`DiscreteChoiceCalculations.DiscreteChoiceCalculations`

— Module**DiscreteChoiceCalculations.jl**

Tiny Julia package that contains calculations for discrete choice models (used in economics).

Currently implemented:

- expected continuation value and probabilities for
*Gumbel*shocks

See the package docstring to get started.

**API**

`DiscreteChoiceCalculations.ECV_and_probabilities`

— Method```
ECV_and_probabilities(noise, V)
```

For IID random variables $εᵢ ∼ ex{noise}$, return

- the
*expected continuation value (ECV)*`ECV = E[maxᵢ (Vᵢ + εᵢ)]`

`, and - the probabilities of $πᵢ$ of $X = Vᵢ + εᵢ$

as a `NamedTuple{(:ECV,:π)}`

, where `π`

has the same “shape” as `V`

, and other characteristics are retained to the extent possible (eg `SArray`

s, `Tuple`

s etc are mapped to similar types).