Closed arteagac closed 1 year ago
Dear @olihno, Can you please test this feature? For this you need to uninstall your current version of xlogit and install the version in the temporary branch addit
, as shown below.
pip uninstall xlogit
pip install git+https://github.com/arteagac/xlogit.git@addit
Thank you @Olihno for the comprehensive testing of this functionality. I will proceed to close this issue.
The temporary branch
addit
implements an additive term in the utility formulation. This additive term can help model coefficients kept at a fixed value as well as alternative specific fixed values. The additive term can be included in thefit
andpredict
functions as follows:which would result in the following utility specification that simulates a coefficient of -1 for the cost coefficient kept fixed throughout the estimation (the portion in squared brackets is the
addit
term):$$ U_{j} = \beta0 + \beta{1j} x{1j} + ... + [-1\cdot x{cost j}]$$
Note that you can also add multiple terms by simple pre-computing the
addit
term.