MixedLogit.make_control_function#

MixedLogit.make_control_function(n_obs, n_alts)[source]#

Create control function for price endogeneity correction.

Implements a control function approach where: 1. Price is modeled as a function of instruments 2. Price errors are computed 3. Price errors are included in utility with correlation parameter

Parameters:
n_obsint

Number of observations

n_altsint

Number of alternatives

Returns:
price_error_contribTensorVariable

Contribution to utility from price endogeneity, shape (n_obs, n_alts)